Class ExFull

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ScriptHandler.ScriptException

public class ExFull extends ExceptionBase
An exception class derived from ExceptionBase that simply consists of a collection of exceptions.

Use this class to collect multiple errors when different areas of code need to add detail information to errors as they percolate up from several catch/throw blocks.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiate a ExFull object with a single exception in its collection.
    ExFull(int nResId)
    Instantiates an ExFull object with a single exception in its collection.
    ExFull(int nResId, String p1)
    Constructor that accepts a positioned message format string with one parameter.
    ExFull(MsgFormat oFormat)
    Instantiate a ExFull object with a single exception in its collection, whose resource property is the MsgFormatPos's resource property, and whose error message text property is the MsgFormatPos's string property.
    Instantiate a ExFull object with a single exception in its collection, whose resource property is the MsgFormatPos's resource property, and whose error message text property is the MsgFormatPos's string property.
    Instantiates an ExFull object with a single exception in its collection whose error message text property is the text of the given Java exception.
    ExFull(String text, int resId)
    Constructor with resource ID and final string for a single error item.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Counts of the number of exceptions in this object's collection.
    int
    Gets the resource property of the first exception in this object's collection.
    int
    getResId(int n)
    Gets the resource property of the n'th exception in this object's collection.
    boolean
    hasResId(int nResId)
    Determines if this object's collection of exceptions for a resource property that matches the given resource.
    void
    insert(ExFull source, boolean bAppend)
    Inserts the given ExFull's collection of exceptions into this object's collection.
    item(int n)
    References the n'th exception in this object's collection.
    void
    Resolves this object's collection of exceptions, ensuring that any resource text associated with each of the exceptions' resource property has been loaded.
    Concatenates all the error message text properties from this object's collection of exceptions.

    Methods inherited from class com.adobe.xfa.ut.ExceptionBase

    wasReported, wasReported

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExFull

      public ExFull()
      Instantiate a ExFull object with a single exception in its collection.
    • ExFull

      public ExFull(Exception e)
      Instantiates an ExFull object with a single exception in its collection whose error message text property is the text of the given Java exception.
      Parameters:
      e - the Java exception.
    • ExFull

      public ExFull(int nResId)
      Instantiates an ExFull object with a single exception in its collection.
      Parameters:
      nResId - set this object's exception resource property to the given resource.
    • ExFull

      public ExFull(int nResId, String p1)
      Constructor that accepts a positioned message format string with one parameter.
      Parameters:
      nResId - resource id of the message
      p1 - the single string parameter.
    • ExFull

      public ExFull(String text, int resId)
      Constructor with resource ID and final string for a single error item.

      In the C++ implementation, the constructor with resource ID and string parameters does no message formatting; it simply treats the given string as the formatted one. In Java, the constructor with similar signature uses the resource ID to get a formatting template and then formats the given string into that. Enough Java code has been written based on that behaviour that it cannot be made consistent with C++ at this point.

      This constructor provides the C++ behaviour, which is also necessary in Java. It reverses the order of the parameters to get a unique method signature.

      Parameters:
      text - Final (unformatted) text for the single error item added to the exception.
      resId - Resource ID.
    • ExFull

      public ExFull(MsgFormat oFormat)
      Instantiate a ExFull object with a single exception in its collection, whose resource property is the MsgFormatPos's resource property, and whose error message text property is the MsgFormatPos's string property.

      This c'tor is suitable only for resources whose associated message text is parameterized.

      Parameters:
      oFormat - a Formatted message string
    • ExFull

      public ExFull(MsgFormatPos oFormat)
      Instantiate a ExFull object with a single exception in its collection, whose resource property is the MsgFormatPos's resource property, and whose error message text property is the MsgFormatPos's string property.

      This c'tor is suitable only for resources whose associated message text is parameterized.

      Parameters:
      oFormat - a Formatted message string
  • Method Details

    • count

      public int count()
      Counts of the number of exceptions in this object's collection.
      Specified by:
      count in class ExceptionBase
      Returns:
      the count.
    • firstResId

      public int firstResId()
      Gets the resource property of the first exception in this object's collection.
      Returns:
      the resource.
    • getResId

      public int getResId(int n)
      Gets the resource property of the n'th exception in this object's collection.
      Parameters:
      n - the index of the zero-based n'th item.
      Returns:
      the resource.
    • hasResId

      public boolean hasResId(int nResId)
      Determines if this object's collection of exceptions for a resource property that matches the given resource.
      Parameters:
      nResId - the resource to search for.
      Returns:
      boolean true if found, and false if not.
    • insert

      public void insert(ExFull source, boolean bAppend)
      Inserts the given ExFull's collection of exceptions into this object's collection.
      Parameters:
      source - the ExFull object to copy from.
      bAppend - boolean true to append at the end of this object's collection, and false to insert at the beginning of this object's collection. The default is to append at the end.
    • item

      public ExErrItem item(int n)
      References the n'th exception in this object's collection.
      Specified by:
      item in class ExceptionBase
      Parameters:
      n - the index of zero-based exception to return. Must be in the range 0 to Count() - 1.
      Returns:
      the n'th exception.
    • resolve

      public void resolve()
      Resolves this object's collection of exceptions, ensuring that any resource text associated with each of the exceptions' resource property has been loaded.
      Specified by:
      resolve in class ExceptionBase
    • toString

      public String toString()
      Concatenates all the error message text properties from this object's collection of exceptions.
      Overrides:
      toString in class Throwable
      Returns:
      the concatenated error message texts. A newline character is appended to each error message texts.