Class UtilError

All Implemented Interfaces:
Serializable

public class UtilError extends RuntimeException
Exception class for package org.apache.uima.util. Automatically generated from message catalog.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • resource_file

      private static final String resource_file
      See Also:
    • missing_resource_error

      private static final String missing_resource_error
      See Also:
    • MESSAGES_NOT_FOUND

      private static final int MESSAGES_NOT_FOUND
      See Also:
    • ILLEGAL_DTR_INDEX

      public static final int ILLEGAL_DTR_INDEX
      Out of bounds error while retrieving daughter node.
      See Also:
    • ILLEGAL_SUCCESSOR_INDEX

      public static final int ILLEGAL_SUCCESSOR_INDEX
      Index out of bounds error while retrieving successor node.
      See Also:
    • ILLEGAL_PREDECESSOR_INDEX

      public static final int ILLEGAL_PREDECESSOR_INDEX
      Index out of bounds error while retrieving predecessor node.
      See Also:
    • identifiers

      private static final String[] identifiers
    • error

      private int error
    • resource

      private ResourceBundle resource
    • arguments

      private Object[] arguments
  • Constructor Details

    • UtilError

      public UtilError(int error)
      Create a new UtilError
      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

      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 "UtilError: ".
    • addArgument

      public boolean addArgument(String s)
      Add an argument to a UtilError 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:
      -