IllegalFormatException  |  API reference  |  Android Developers (original) (raw)

open class IllegalFormatException : IllegalArgumentException

kotlin.Any
kotlin.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException

Known Direct Subclasses

DuplicateFormatFlagsException, FormatFlagsConversionMismatchException, IllegalFormatCodePointException, IllegalFormatConversionException, IllegalFormatFlagsException, IllegalFormatPrecisionException, IllegalFormatWidthException, MissingFormatArgumentException, MissingFormatWidthException, UnknownFormatConversionException, UnknownFormatFlagsException

DuplicateFormatFlagsException Unchecked exception thrown when duplicate flags are provided in the format specifier.
FormatFlagsConversionMismatchException Unchecked exception thrown when a conversion and flag are incompatible.
IllegalFormatCodePointException Unchecked exception thrown when a character with an invalid Unicode code point as defined by Character.isValidCodePoint is passed to the Formatter.
IllegalFormatConversionException Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.
IllegalFormatFlagsException Unchecked exception thrown when an illegal combination flags is given.
IllegalFormatPrecisionException 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.
IllegalFormatWidthException Unchecked exception thrown when the format width is a negative value other than -1 or is otherwise unsupported.
MissingFormatArgumentException Unchecked exception thrown when there is a format specifier which does not have a corresponding argument or if an argument index refers to an argument that does not exist.
MissingFormatWidthException Unchecked exception thrown when the format width is required.
UnknownFormatConversionException Unchecked exception thrown when an unknown conversion is given.
UnknownFormatFlagsException Unchecked exception thrown when an unknown flag is given.

Unchecked exception thrown when a format string contains an illegal syntax or a format specifier that is incompatible with the given arguments. Only explicit subtypes of this exception which correspond to specific errors should be instantiated.

Summary

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.