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:
    Serializable

      public class AnnotationImplException
      extends 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 and Description
    --- | ---
    `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}.
    `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}.
    `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 and Description
    `AnnotationImplException(int error)` Create a new `AnnotationImplException`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addArgument(String s)` Add an argument to a `AnnotationImplException` object.
    `String[]` | `getArguments()` Get the arguments to the exception string.
    `String` | `getBundleShortName()` Get the short name of the message bundle, i.e., the name without the package prefix.
    `int` | `getError()`
    `String` | `getMessage()`
    `String` | `getMessageCode()` Get the string identifier for this exception.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### 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

  - ### Constructor Detail

    - #### AnnotationImplException

          public AnnotationImplException(int error)

      Create a new `AnnotationImplException`
      Parameters:
        `error` - The error code.

  - ### 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 String getMessage()

      Overrides:
        `getMessage` in class `Throwable`
      Returns:
        The message of the exception. Useful for including the text in another exception.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`
      Returns:
        The same as getMessage(), but prefixed with `"AnnotationImplException: "`.

    - #### addArgument

          public boolean addArgument(String s)

      Add an argument to a `AnnotationImplException` object. Excess arguments will be ignored, and missing arguments will have the value `null`. 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 a `null String` has no effect! So if you don't know the value of an argument, use something like `""` or `"UNKNOWN"`, but not `null`.
      Parameters:
        `s` - -
      Returns:
        true if found a null spot to insert string s into

    - #### getMessageCode

          public String getMessageCode()

      Get the string identifier for this exception.
      Returns:
        The internal message key.

    - #### getArguments

          public String[] getArguments()

      Get the arguments to the exception string.
      Returns:
        The arguments to the exception.

    - #### getBundleShortName

          public 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.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.