java.util
Class IllformedLocaleException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.util.IllformedLocaleException
All Implemented Interfaces:
Serializable

public class IllformedLocaleException
extends RuntimeException

Thrown by methods in java.util.Locale to indicate that a value is ill-formed.

Since:
1.7
See Also:
Locale, Serialized Form

Constructor Summary
Constructor and Description
IllformedLocaleException(String message)
          Constructs a new IllformedLocaleException with the given message and -1 as the error index.
IllformedLocaleException(String message, int errorIndex)
          Constructs a new IllformedLocaleException with the given message and error index.
 
Method Summary
Modifier and Type Method and Description
 int getErrorIndex()
          Returns the index where the error was found, or -1 if unknown.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IllformedLocaleException

public IllformedLocaleException(String message)
Constructs a new IllformedLocaleException with the given message and -1 as the error index.

Parameters:
message - the message
Since:
1.7

IllformedLocaleException

public IllformedLocaleException(String message,
                                int errorIndex)
Constructs a new IllformedLocaleException with the given message and error index. The index is approximate offset from the start of the ill-formed value to the point where the parse first detected an error.

Parameters:
message - the message
errorIndex - the index
Since:
1.7
Method Detail

getErrorIndex

public int getErrorIndex()
Returns the index where the error was found, or -1 if unknown.

Returns:
the error index
Since:
1.7