Top Description Fields Constructors Methods
java.util

public Class IllformedLocaleException

extends RuntimeException
Class Inheritance

Thrown by methods in Locale and Locale.Builder to indicate that an argument is not a well-formed BCP 47 tag.
Since
1.7
See Also
Locale

Field Summary

Modifier and TypeField and Description
private int
private static final long

Constructor Summary

AccessConstructor and Description
public
IllformedLocaleException()

Constructs a new IllformedLocaleException with no detail message and -1 as the error index.

public
IllformedLocaleException(String
the message
message
)

Constructs a new IllformedLocaleException with the given message and -1 as the error index.

public
IllformedLocaleException(String
the message
message
,
int
the index
errorIndex
)

Constructs a new IllformedLocaleException with the given message and the error index.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the error index
getErrorIndex
()

Returns the index where the error was found.

Field Detail

_errIdxback to summary
private int _errIdx
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

IllformedLocaleExceptionback to summary
public IllformedLocaleException()

Constructs a new IllformedLocaleException with no detail message and -1 as the error index.

IllformedLocaleExceptionback to summary
public IllformedLocaleException(String message)

Constructs a new IllformedLocaleException with the given message and -1 as the error index.

Parameters
message:String

the message

IllformedLocaleExceptionback to summary
public IllformedLocaleException(String message, int errorIndex)

Constructs a new IllformedLocaleException with the given message and the error index. The error index is the approximate offset from the start of the ill-formed value to the point where the parse first detected an error. A negative error index value indicates either the error index is not applicable or unknown.

Parameters
message:String

the message

errorIndex:int

the index

Method Detail

getErrorIndexback to summary
public int getErrorIndex()

Returns the index where the error was found. A negative value indicates either the error index is not applicable or unknown.

Returns:int

the error index