Package org.apache.uima.cas.impl
Class AnnotationImplException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.uima.cas.impl.AnnotationImplException
-
- All Implemented Interfaces:
java.io.Serializable
public class AnnotationImplException extends java.lang.Exception
Exception class for package org.apache.uima.cas.impl. Automatically generated from message catalog.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
arguments
static int
CANT_ADD_TOP
Type system parsing error for file "{0}": couldn't add top type "{1}" at line {2}, column {3}.static int
COULDNT_ADD_FEAT
Error parsing types system file "{0}": feature "{1}" could not be added at line {2}, column {3}.static int
COULDNT_ADD_TYPE
Error parsing types system file "{0}": type "{1}" could not be added at line {2}, column {3}.private int
error
private static java.lang.String[]
identifiers
private static int
MESSAGES_NOT_FOUND
private static java.lang.String
missing_resource_error
static int
NULL_DOCSTREAM
Error printing type system: set docStream first.static int
PARSING_ERROR
Error parsing types system file "{0}": expected {1} but found "{2}" at line {3}, column {4}.private java.util.ResourceBundle
resource
private static java.lang.String
resource_file
private static long
serialVersionUID
static int
UNKN_TYPE
Error parsing types system file "{0}": type "{1}" must be declared before it is used at line {2}, column {3}.
-
Constructor Summary
Constructors Constructor Description AnnotationImplException(int error)
Create a newAnnotationImplException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addArgument(java.lang.String s)
Add an argument to aAnnotationImplException
object.java.lang.String[]
getArguments()
Get the arguments to the exception string.java.lang.String
getBundleShortName()
Get the short name of the message bundle, i.e., the name without the package prefix.int
getError()
java.lang.String
getMessage()
java.lang.String
getMessageCode()
Get the string identifier for this exception.java.lang.String
toString()
-
-
-
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
-
CANT_ADD_TOP
public static final int CANT_ADD_TOP
Type system parsing error for file "{0}": couldn't add top type "{1}" at line {2}, column {3}. Non-empty hierarchy?- See Also:
- Constant Field Values
-
PARSING_ERROR
public static final int PARSING_ERROR
Error parsing types system file "{0}": expected {1} but found "{2}" at line {3}, column {4}.- See Also:
- Constant Field Values
-
UNKN_TYPE
public static final int UNKN_TYPE
Error parsing types system file "{0}": type "{1}" must be declared before it is used at line {2}, column {3}.- See Also:
- Constant Field Values
-
COULDNT_ADD_FEAT
public static final int COULDNT_ADD_FEAT
Error parsing types system file "{0}": feature "{1}" could not be added at line {2}, column {3}. Name already in use?- See Also:
- Constant Field Values
-
COULDNT_ADD_TYPE
public static final int COULDNT_ADD_TYPE
Error parsing types system file "{0}": type "{1}" could not be added at line {2}, column {3}. Name already in use?- See Also:
- Constant Field Values
-
NULL_DOCSTREAM
public static final int NULL_DOCSTREAM
Error printing type system: set docStream first.- 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.String[] 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:
getMessage
in classjava.lang.Throwable
- Returns:
- The message of the exception. Useful for including the text in another exception.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- The same as getMessage(), but prefixed with
"AnnotationImplException: "
.
-
addArgument
public boolean addArgument(java.lang.String s)
Add an argument to aAnnotationImplException
object. 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 String
has no effect! So if you don't know the value of an argument, use something like""
or"UNKNOWN"
, but notnull
.- Parameters:
s
- -- Returns:
- true if found a null spot to insert string s into
-
getMessageCode
public java.lang.String getMessageCode()
Get the string identifier for this exception.- Returns:
- The internal message key.
-
getArguments
public java.lang.String[] getArguments()
Get the arguments to the exception string.- Returns:
- The arguments to the exception.
-
getBundleShortName
public java.lang.String getBundleShortName()
Get the short name of the message bundle, i.e., the name without the package prefix.- Returns:
- The short name of the message bundle.
-
-