Stay organized with collections
Save and categorize content based on your preferences.
open class IllegalFormatPrecisionException : IllegalFormatException
Unchecked exception thrown when the precision is a negative value other than -1
, the conversion does not support a precision, or the value is otherwise unsupported. If the precision 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 precision.
|
Public methods |
open Int |
Returns the precision.
|
Public constructors
IllegalFormatPrecisionException(p: Int)
Constructs an instance of this class with the specified precision.
Parameters |
p |
Int: The precision |
Public methods
getPrecision
open fun getPrecision(): Int
Returns the precision. If the precision isn't representable by an int
, then will return 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,["# IllegalFormatPrecisionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nIllegalFormatPrecisionException\n===============================\n\n```\nopen class IllegalFormatPrecisionException : 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.IllegalFormatPrecisionException](#) |\n\nUnchecked exception thrown when the precision is a negative value other than `-1`, the conversion does not support a precision, or the value is otherwise unsupported. If the precision 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| [IllegalFormatPrecisionException](#IllegalFormatPrecisionException(kotlin.Int))`(`p:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Constructs an instance of this class with the specified precision. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------|------------------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPrecision](#getPrecision())`()` Returns the precision. |\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### IllegalFormatPrecisionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nIllegalFormatPrecisionException(p: Int)\n```\n\nConstructs an instance of this class with the specified precision.\n\n| Parameters ||\n|-----|-------------------------------------------------------------------------------------------|\n| `p` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The precision |\n\nPublic methods\n--------------\n\n### getPrecision\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getPrecision(): Int\n```\n\nReturns the precision. If the precision isn't representable by an `int`, then will return `Integer.MIN_VALUE`.\n\n| Return ||\n|----------------------------------------------------------------------------|---------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | The precision |\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`). |"]]