Package org.apache.uima.internal.util
Class UtilError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.uima.internal.util.UtilError
-
- All Implemented Interfaces:
java.io.Serializable
public class UtilError extends java.lang.RuntimeExceptionException class for package org.apache.uima.util. Automatically generated from message catalog.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]argumentsprivate interrorprivate static java.lang.String[]identifiersstatic intILLEGAL_DTR_INDEXOut of bounds error while retrieving daughter node.static intILLEGAL_PREDECESSOR_INDEXIndex out of bounds error while retrieving predecessor node.static intILLEGAL_SUCCESSOR_INDEXIndex out of bounds error while retrieving successor node.private static intMESSAGES_NOT_FOUNDprivate static java.lang.Stringmissing_resource_errorprivate java.util.ResourceBundleresourceprivate static java.lang.Stringresource_fileprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description UtilError(int error)Create a newUtilError
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddArgument(java.lang.String s)Add an argument to aUtilErrorobject.intgetError()java.lang.StringgetMessage()java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
resource_file
private static final java.lang.String resource_file
- See Also:
- Constant Field Values
-
missing_resource_error
private static final java.lang.String missing_resource_error
- See Also:
- Constant Field Values
-
MESSAGES_NOT_FOUND
private static final int MESSAGES_NOT_FOUND
- See Also:
- Constant Field Values
-
ILLEGAL_DTR_INDEX
public static final int ILLEGAL_DTR_INDEX
Out of bounds error while retrieving daughter node.- See Also:
- Constant Field Values
-
ILLEGAL_SUCCESSOR_INDEX
public static final int ILLEGAL_SUCCESSOR_INDEX
Index out of bounds error while retrieving successor node.- See Also:
- Constant Field Values
-
ILLEGAL_PREDECESSOR_INDEX
public static final int ILLEGAL_PREDECESSOR_INDEX
Index out of bounds error while retrieving predecessor node.- See Also:
- Constant Field Values
-
identifiers
private static final java.lang.String[] identifiers
-
error
private int error
-
resource
private java.util.ResourceBundle resource
-
arguments
private java.lang.Object[] arguments
-
-
Method Detail
-
getError
public int getError()
- Returns:
- The error code for the exception. This may be useful when the error needs to be handed over language boundaries. Instead of handing over the complete exception object, return the error code, and the receiving application can look up the error in the message file. Unfortunately, the error parameters get lost that way.
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- The message of the exception. Useful for including the text in another exception.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable- Returns:
- The same as getMessage(), but prefixed with
"UtilError: ".
-
addArgument
public boolean addArgument(java.lang.String s)
Add an argument to aUtilErrorobject. Excess arguments will be ignored, and missing arguments will have the valuenull. Add arguments in the order in which they are specified in the message catalog (i.e. add %1 first, %2 next, and so on). Adding anull Stringhas no effect! So if you don't know the value of an argument, use something like""or"UNKNOWN", but notnull.- Parameters:
s- -- Returns:
- -
-
-