Class ExFull
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.adobe.xfa.ut.ExceptionBase
-
- com.adobe.xfa.ut.ExFull
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ScriptHandler.ScriptException
public class ExFull extends ExceptionBase
An exception class derived fromExceptionBase
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExFull()
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, java.lang.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.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.ExFull(java.lang.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.ExFull(java.lang.String text, int resId)
Constructor with resource ID and final string for a single error item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
count()
Counts of the number of exceptions in this object's collection.int
firstResId()
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.ExErrItem
item(int n)
References the n'th exception in this object's collection.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.java.lang.String
toString()
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
-
-
-
-
Constructor Detail
-
ExFull
public ExFull()
Instantiate a ExFull object with a single exception in its collection.
-
ExFull
public ExFull(java.lang.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, java.lang.String p1)
Constructor that accepts a positioned message format string with one parameter.- Parameters:
nResId
- resource id of the messagep1
- the single string parameter.
-
ExFull
public ExFull(java.lang.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 Detail
-
count
public int count()
Counts of the number of exceptions in this object's collection.- Specified by:
count
in classExceptionBase
- 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 classExceptionBase
- 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 classExceptionBase
-
toString
public java.lang.String toString()
Concatenates all the error message text properties from this object's collection of exceptions.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- the concatenated error message texts. A newline character is appended to each error message texts.
-
-