Class IllformedLocaleException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibm.icu.util.IllformedLocaleException
- All Implemented Interfaces:
Serializable
Thrown by methods in
ULocale and ULocale.Builder to indicate that an argument is
not a well-formed BCP 47 tag.- See Also:
- Status:
- Stable ICU 4.2.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newIllformedLocaleExceptionwith no detail message and -1 as the error index.IllformedLocaleException(String message) Constructs a newIllformedLocaleExceptionwith the given message and -1 as the error index.IllformedLocaleException(String message, int errorIndex) Constructs a newIllformedLocaleExceptionwith the given message and the error index. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index where the error was found.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IllformedLocaleException
public IllformedLocaleException()Constructs a newIllformedLocaleExceptionwith no detail message and -1 as the error index.- Status:
- Stable ICU 4.6.
-
IllformedLocaleException
Constructs a newIllformedLocaleExceptionwith the given message and -1 as the error index.- Parameters:
message- the message- Status:
- Stable ICU 4.2.
-
IllformedLocaleException
Constructs a newIllformedLocaleExceptionwith 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- the messageerrorIndex- the index- Status:
- Stable ICU 4.2.
-
-
Method Details
-
getErrorIndex
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:
- the error index
- Status:
- Stable ICU 4.2.
-