Package org.apache.uima.cas.admin
Class CASAdminException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.uima.cas.admin.CASAdminException
- All Implemented Interfaces:
Serializable
Exception class for package org.apache.uima.cas.admin. Automatically generated from message
catalog.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String[]
static final int
Invalid feature name "{0}".static final int
Invalid type name "{0}".static final int
Error deserializing type system.static final int
Trying to define feature "{0}" on type "{1}" with range "{2}", but feature has already been defined on (super)type "{3}" with range "{4}".private int
static final int
Can't flush CAS, flushing is disabled.private static final String[]
static final int
{0}private static final int
private static final String
static final int
Index repository has not been committed; can't create CAS.static final int
Type system has not been committed; can't create index repository.static final int
Can't add index to a committed repository.private ResourceBundle
private static final String
private static final long
static final int
Can't add feature to type "{0}" since it is feature final.static final int
Can't derive from type "{0}" since it is inheritance final.static final int
Type system is committed; can't add types or features. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Add an argument to aCASAdminException
object.String[]
Get the arguments to the exception string.Get the short name of the message bundle, i.e., the name without the package prefix.int
getError()
Get the string identifier for this exception.toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
resource_file
- See Also:
-
missing_resource_error
- See Also:
-
MESSAGES_NOT_FOUND
private static final int MESSAGES_NOT_FOUND- See Also:
-
REPOSITORY_LOCKED
public static final int REPOSITORY_LOCKEDCan't add index to a committed repository.- See Also:
-
TYPE_SYSTEM_LOCKED
public static final int TYPE_SYSTEM_LOCKEDType system is committed; can't add types or features.- See Also:
-
MUST_COMMIT_TYPE_SYSTEM
public static final int MUST_COMMIT_TYPE_SYSTEMType system has not been committed; can't create index repository.- See Also:
-
MUST_COMMIT_INDEX_REPOSITORY
public static final int MUST_COMMIT_INDEX_REPOSITORYIndex repository has not been committed; can't create CAS.- See Also:
-
BAD_TYPE_SYNTAX
public static final int BAD_TYPE_SYNTAXInvalid type name "{0}". Type names must start with a letter and consist only of letters, digits, or underscores.- See Also:
-
BAD_FEATURE_SYNTAX
public static final int BAD_FEATURE_SYNTAXInvalid feature name "{0}". Feature names must start with a letter and consist only of letters, digits, or underscores.- See Also:
-
TYPE_IS_INH_FINAL
public static final int TYPE_IS_INH_FINALCan't derive from type "{0}" since it is inheritance final.- See Also:
-
TYPE_IS_FEATURE_FINAL
public static final int TYPE_IS_FEATURE_FINALCan't add feature to type "{0}" since it is feature final.- See Also:
-
DESERIALIZATION_ERROR
public static final int DESERIALIZATION_ERRORError deserializing type system.- See Also:
-
FLUSH_DISABLED
public static final int FLUSH_DISABLEDCan't flush CAS, flushing is disabled.- See Also:
-
JCAS_ERROR
public static final int JCAS_ERROR{0}- See Also:
-
DUPLICATE_FEATURE
public static final int DUPLICATE_FEATURETrying to define feature "{0}" on type "{1}" with range "{2}", but feature has already been defined on (super)type "{3}" with range "{4}".- See Also:
-
identifiers
-
error
private int error -
resource
-
arguments
-
-
Constructor Details
-
CASAdminException
public CASAdminException(int error) Create a newCASAdminException
- Parameters:
error
- The error code.
-
-
Method Details
-
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
- Overrides:
getMessage
in classThrowable
- Returns:
- The message of the exception. Useful for including the text in another exception.
-
toString
-
addArgument
Add an argument to aCASAdminException
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
- the argument to add- Returns:
- true if the argument was added
-
getMessageCode
Get the string identifier for this exception.- Returns:
- The internal message key.
-
getArguments
Get the arguments to the exception string.- Returns:
- The arguments to the exception.
-
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.
-