com.filenet.api.exception

Class ErrorRecord

  • java.lang.Object
    • com.filenet.api.exception.ErrorRecord
  • All Implemented Interfaces:
    java.io.Serializable


    public class ErrorRecord
    extends java.lang.Object
    implements java.io.Serializable
    Represents a single exception that has occurred on the server. When the server returns an exception to the client it converts each chained exception into an ErrorRecord object and places it in an error stack (ErrorStack).
    See Also:
    ErrorStack, EngineRuntimeException, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String DIAGNOSTIC_EXCEPTION_CODE
      When the exception is an EngineRuntimeException instance, this field identifies the exception code.
      static java.lang.String DIAGNOSTIC_FAILED_BATCH_ITEM
      When an UpdatingBatch fails, this diagnostic item contains a zero-based integer value indicating which item in the UpdatingBatch failed.
      static java.lang.String DIAGNOSTIC_STACK_TRACE
      Identifies the stack trace information for the exception.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ErrorRecord(java.lang.String source, java.lang.String description, java.util.HashMap diagnosticTypes)
      Use this to create a record from exception data.
      ErrorRecord(java.lang.Throwable erte)
      Use this to create a record for any exception.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getDescription()
      Gets the description string for the exception.
      java.util.HashMap getDiagnosticTypes()
      Returns the key and associated value describing the specific details required to troubleshoot the exception.
      java.lang.String getSource()
      Gets the name of the exception instance that occurred.
      java.lang.String toString()
      Returns the details of the exception.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DIAGNOSTIC_EXCEPTION_CODE

        public static final java.lang.String DIAGNOSTIC_EXCEPTION_CODE
        When the exception is an EngineRuntimeException instance, this field identifies the exception code. This field is used by getDiagnosticTypes and toString.
        See Also:
        Constant Field Values
      • DIAGNOSTIC_FAILED_BATCH_ITEM

        public static final java.lang.String DIAGNOSTIC_FAILED_BATCH_ITEM
        When an UpdatingBatch fails, this diagnostic item contains a zero-based integer value indicating which item in the UpdatingBatch failed. This is used internally by the API to link the exception to appropriate BatchItemHandle. This field is used by getDiagnosticTypes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ErrorRecord

        public ErrorRecord(java.lang.Throwable erte)
        Use this to create a record for any exception. This can be an EngineRuntimeException instance cast as a Throwable object.
        Parameters:
        erte - A java.lang.Throwable object for either the exception, or the EngineRuntimeException instance.
      • ErrorRecord

        public ErrorRecord(java.lang.String source,
                   java.lang.String description,
                   java.util.HashMap diagnosticTypes)
        Use this to create a record from exception data.
        Parameters:
        source - A String containing the name of the exception instance that occurred.
        description - A String containing a description of the exception.
        diagnosticTypes - A HashMap object containing the exception code string, and a string containing the stack trace information (from java.lang.Throwable.getStackTrace) for this exception.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Gets the description string for the exception.
        Returns:
        A String containing the exception description. For an EngineRuntimeException instance, the text is localized to the client locale (either the default locale of the client JVM or the locale that has been set in the UserContext object).
      • getSource

        public java.lang.String getSource()
        Gets the name of the exception instance that occurred.
        Returns:
        A String containing the instance name of the exception.
      • getDiagnosticTypes

        public java.util.HashMap getDiagnosticTypes()
        Returns the key and associated value describing the specific details required to troubleshoot the exception. For an EngineRuntimeException, this generally includes the specific exception code and stack trace of where the problem occurred.
        Returns:
        A HashMap object containing the exception code string, and a string containing the stack trace information (from java.lang.Throwable.getStackTrace) for this exception.
      • toString

        public java.lang.String toString()
        Returns the details of the exception. The result is the concatenation of the following:
        • The name of the exception's class
        • The name of the exception code
        • The exception's error message
        • The exception's stack trace
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of the exception.

© Copyright IBM Corporation 2006, 2013. All rights reserved.