Fields Summary |
---|
public static final int | U_ERROR_INFO_STARTStart of information results (semantically successful) |
public static final int | U_USING_FALLBACK_ERRORA resource bundle lookup returned a fallback result (not an error) |
public static final int | U_USING_DEFAULT_ERRORA resource bundle lookup returned a result from the root locale (not an
error) |
public static final int | U_SAFECLONE_ALLOCATED_ERRORA SafeClone operation required allocating memory (informational
only |
public static final int | U_ERROR_INFO_LIMITThis must always be the last warning value to indicate the limit for
UErrorCode warnings (last warning code +1) |
public static final int | U_ZERO_ERRORNo error, no warning |
public static final int | U_ILLEGAL_ARGUMENT_ERRORStart of codes indicating failure |
public static final int | U_MISSING_RESOURCE_ERROR |
public static final int | U_INVALID_FORMAT_ERROR |
public static final int | U_FILE_ACCESS_ERROR |
public static final int | U_INTERNAL_PROGRAM_ERRORIndicates a bug in the library code |
public static final int | U_MESSAGE_PARSE_ERROR |
public static final int | U_MEMORY_ALLOCATION_ERRORMemory allocation error |
public static final int | U_INDEX_OUTOFBOUNDS_ERROR |
public static final int | U_PARSE_ERROREquivalent to Java ParseException |
public static final int | U_INVALID_CHAR_FOUNDIn the Character conversion routines: Invalid character or sequence was
encountered |
public static final int | U_TRUNCATED_CHAR_FOUNDIn the Character conversion routines: More bytes are required to complete
the conversion successfully |
public static final int | U_ILLEGAL_CHAR_FOUNDIn codeset conversion: a sequence that does NOT belong in the codepage has
been encountered |
public static final int | U_INVALID_TABLE_FORMATConversion table file found, but corrupted |
public static final int | U_INVALID_TABLE_FILEConversion table file not found |
public static final int | U_BUFFER_OVERFLOW_ERRORA result would not fit in the supplied buffer |
public static final int | U_UNSUPPORTED_ERRORRequested operation not supported in current context |
public static final int | U_RESOURCE_TYPE_MISMATCHan operation is requested over a resource that does not support it |
public static final int | U_ILLEGAL_ESCAPE_SEQUENCEISO-2022 illlegal escape sequence |
public static final int | U_UNSUPPORTED_ESCAPE_SEQUENCEISO-2022 unsupported escape sequence |
public static final int | U_NO_SPACE_AVAILABLENo space available for in-buffer expansion for Arabic shaping |
public static final int | U_ERROR_LIMITThis must always be the last value to indicate the limit for UErrorCode
(last error code +1) |
public static boolean | LIBRARY_LOADEDLoad library flag |
private static final String[] | ERROR_NAMES_Array of error code names corresponding to the errorcodes.
ie ERROR_NAMES_[0] = name of U_ZERO_ERROR |
Methods Summary |
---|
public static java.lang.String | getErrorName(int ec)Returns the error name of the input error code
return ERROR_NAMES_[ec];
|
public static final java.lang.RuntimeException | getException(int error)Generic mapping from the error codes to java default exceptions.
if (error <= U_ZERO_ERROR && error >= U_ERROR_LIMIT) {
return null;
}
String errorname = ERROR_NAMES_[U_ILLEGAL_ARGUMENT_ERROR];
switch (error) {
case U_ILLEGAL_ARGUMENT_ERROR :
return new IllegalArgumentException(errorname);
case U_INDEX_OUTOFBOUNDS_ERROR :
return new ArrayIndexOutOfBoundsException(errorname);
case U_BUFFER_OVERFLOW_ERROR :
return new ArrayIndexOutOfBoundsException(errorname);
case U_UNSUPPORTED_ERROR :
return new UnsupportedOperationException(errorname);
default :
return new RuntimeException(errorname);
}
|
public static boolean | isFailure(int ec)Returns true if the input error code denotes failure
return (ec>U_ZERO_ERROR);
|
public static boolean | isSuccess(int ec)Returns true if the input error code denotes success
return (ec<=U_ZERO_ERROR);
|