Package java.util
Class IllegalFormatConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
java.util.IllegalFormatException
java.util.IllegalFormatConversionException
- All Implemented Interfaces:
Serializable
public class IllegalFormatConversionException extends IllegalFormatException implements Serializable
An
IllegalFormatConversionException will be thrown when the parameter
is incompatible with the corresponding format specifier.- Since:
- 1.5
- See Also:
RuntimeException, Serialized Form
-
Constructor Summary
Constructors Constructor Description IllegalFormatConversionException(char c, Class<?> arg)Constructs a newIllegalFormatConversionExceptionwith the class of the mismatched conversion and corresponding parameter. -
Method Summary
Modifier and Type Method Description Class<?>getArgumentClass()Returns the class of the mismatched parameter.chargetConversion()Returns the incompatible conversion.StringgetMessage()Returns the detail message which was provided when thisThrowablewas created.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllegalFormatConversionException
Constructs a newIllegalFormatConversionExceptionwith the class of the mismatched conversion and corresponding parameter.- Parameters:
c- the class of the mismatched conversion.arg- the corresponding parameter.
-
-
Method Details
-
getArgumentClass
Returns the class of the mismatched parameter.- Returns:
- the class of the mismatched parameter.
-
getConversion
public char getConversion()Returns the incompatible conversion.- Returns:
- the incompatible conversion.
-
getMessage
Description copied from class:ThrowableReturns the detail message which was provided when thisThrowablewas created. Returnsnullif no message was provided at creation time.- Overrides:
getMessagein classThrowable
-