Stay organized with collections
Save and categorize content based on your preferences.
open class IllegalFormatWidthException : IllegalFormatException
Unchecked exception thrown when the format width is a negative value other than -1
or is otherwise unsupported. If a given format width is not representable by an int
type, then the value Integer.MIN_VALUE
will be used in the exception.
Summary
Public constructors |
Constructs an instance of this class with the specified width.
|
Public methods |
open Int |
Returns the width.
|
Public constructors
IllegalFormatWidthException(w: Int)
Constructs an instance of this class with the specified width.
Parameters |
w |
Int: The width |
Public methods
getWidth
open fun getWidth(): Int
Returns the width. If the width is not representable by an int
, then returns Integer.MIN_VALUE
.
Properties
message
open val message: String?
Return |
String? |
the detail message string of this Throwable instance (which may be null ). |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# IllegalFormatWidthException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nIllegalFormatWidthException\n===========================\n\n```\nopen class IllegalFormatWidthException : IllegalFormatException\n```\n\n|---|---|---|---|---|---|--------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||||\n| | ↳ | [java.lang.Exception](../lang/Exception.html#) |||||\n| | | ↳ | [java.lang.RuntimeException](../lang/RuntimeException.html#) ||||\n| | | | ↳ | [java.lang.IllegalArgumentException](../lang/IllegalArgumentException.html#) |||\n| | | | | ↳ | [java.util.IllegalFormatException](/reference/kotlin/java/util/IllegalFormatException) ||\n| | | | | | ↳ | [java.util.IllegalFormatWidthException](#) |\n\nUnchecked exception thrown when the format width is a negative value other than `-1` or is otherwise unsupported. If a given format width is not representable by an `int` type, then the value `Integer.MIN_VALUE` will be used in the exception.\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [IllegalFormatWidthException](#IllegalFormatWidthException(kotlin.Int))`(`w:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs an instance of this class with the specified width. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------|------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getWidth](#getWidth())`()` Returns the width. |\n\n| Properties ||\n|----------------------------------------------------------------------------------------|------------------------------------------|\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [message](#message:kotlin.String) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### IllegalFormatWidthException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nIllegalFormatWidthException(w: Int)\n```\n\nConstructs an instance of this class with the specified width.\n\n| Parameters ||\n|-----|---------------------------------------------------------------------------------------|\n| `w` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The width |\n\nPublic methods\n--------------\n\n### getWidth\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getWidth(): Int\n```\n\nReturns the width. If the width is not representable by an `int`, then returns `Integer.MIN_VALUE`.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The width |\n\nProperties\n----------\n\n### message\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen val message: String?\n```\n\n| Return ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | the detail message string of this `Throwable` instance (which may be `null`). |"]]