Top Description Fields Constructors Methods
com.ibm.icu.util

public Class IllformedLocaleException

extends RuntimeException
Class Inheritance

Thrown by methods in ULocale and ULocale.Builder to indicate that an argument is not a well-formed BCP 47 tag.
ICU Status
Stable since ICU 4.2.
See Also
ULocale

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.

Constructor Detail

IllformedLocaleExceptionback to summary
public IllformedLocaleException()

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

ICU Status
Stable since ICU 4.6.
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

ICU Status
Stable since ICU 4.2.
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

ICU Status
Stable since ICU 4.2.

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

ICU Status
Stable since ICU 4.2.