Class ExFull
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ScriptHandler.ScriptException
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
ConstructorsConstructorDescriptionExFull()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.Constructor that accepts a positioned message format string with one parameter.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.Instantiates an ExFull object with a single exception in its collection whose error message text property is the text of the given Java exception.Constructor with resource ID and final string for a single error item. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Counts of the number of exceptions in this object's collection.intGets the resource property of the first exception in this object's collection.intgetResId(int n) Gets the resource property of the n'th exception in this object's collection.booleanhasResId(int nResId) Determines if this object's collection of exceptions for a resource property that matches the given resource.voidInserts 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.voidresolve()Resolves this object's collection of exceptions, ensuring that any resource text associated with each of the exceptions' resource property has been loaded.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, wasReportedMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ExFull
public ExFull()Instantiate a ExFull object with a single exception in its collection. -
ExFull
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
Constructor that accepts a positioned message format string with one parameter.- Parameters:
nResId- resource id of the messagep1- the single string parameter.
-
ExFull
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
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
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:
countin 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
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
References the n'th exception in this object's collection.- Specified by:
itemin 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:
resolvein classExceptionBase
-
toString
Concatenates all the error message text properties from this object's collection of exceptions.
-