Stay organized with collections
Save and categorize content based on your preferences.
open class IllegalFormatConversionException : IllegalFormatException
Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.
Unless otherwise specified, passing a null
argument to any method or constructor in this class will cause a NullPointerException
to be thrown.
Summary
Public constructors |
Constructs an instance of this class with the mismatched conversion and the corresponding argument class.
|
Public methods |
open Class<*>! |
Returns the class of the mismatched argument.
|
open Char |
Returns the inapplicable conversion.
|
Public constructors
IllegalFormatConversionException(
c: Char,
arg: Class<*>!)
Constructs an instance of this class with the mismatched conversion and the corresponding argument class.
Parameters |
c |
Char: Inapplicable conversion |
arg |
Class<*>!: Class of the mismatched argument |
Public methods
getArgumentClass
open fun getArgumentClass(): Class<*>!
Returns the class of the mismatched argument.
Return |
Class<*>! |
The class of the mismatched argument |
getConversion
open fun getConversion(): Char
Returns the inapplicable conversion.
Return |
Char |
The inapplicable conversion |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# IllegalFormatConversionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nIllegalFormatConversionException\n================================\n\n```\nopen class IllegalFormatConversionException : 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.IllegalFormatConversionException](#) |\n\nUnchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.\n\nUnless otherwise specified, passing a `null` argument to any method or constructor in this class will cause a [NullPointerException](../lang/NullPointerException.html#) to be thrown.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [IllegalFormatConversionException](#IllegalFormatConversionException(kotlin.Char,%20java.lang.Class))`(`c:` `[Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html)`, `arg:` `[Class](../lang/Class.html#)\u003c*\u003e!`)` Constructs an instance of this class with the mismatched conversion and the corresponding argument class. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| open [Class](../lang/Class.html#)\\\u003c\\*\\\u003e! | [getArgumentClass](#getArgumentClass())`()` Returns the class of the mismatched argument. |\n| open [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html) | [getConversion](#getConversion())`()` Returns the inapplicable conversion. |\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### IllegalFormatConversionException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nIllegalFormatConversionException(\n c: Char, \n arg: Class\u003c*\u003e!)\n```\n\nConstructs an instance of this class with the mismatched conversion and the corresponding argument class.\n\n| Parameters ||\n|-------|-------------------------------------------------------------------------------------------------------|\n| `c` | [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html): Inapplicable conversion |\n| `arg` | [Class](../lang/Class.html#)\\\u003c\\*\\\u003e!: Class of the mismatched argument |\n\nPublic methods\n--------------\n\n### getArgumentClass\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getArgumentClass(): Class\u003c*\u003e!\n```\n\nReturns the class of the mismatched argument.\n\n| Return ||\n|----------------------------------|--------------------------------------|\n| [Class](../lang/Class.html#)\u003c*\u003e! | The class of the mismatched argument |\n\n### getConversion\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getConversion(): Char\n```\n\nReturns the inapplicable conversion.\n\n| Return ||\n|------------------------------------------------------------------------------|-----------------------------|\n| [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html) | The inapplicable conversion |\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`). |"]]