public class ExFull extends ExceptionBase
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.
Constructor and Description |
---|
ExFull()
Instantiate a ExFull object with a single
exception in its collection.
|
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.
|
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.
|
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(String text,
int resId)
Constructor with resource ID and final string for a single error
item.
|
Modifier and Type | Method and 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.
|
String |
toString()
Concatenates all the error message text properties from this object's
collection of exceptions.
|
wasReported, wasReported
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ExFull()
public ExFull(Exception e)
e
- the Java exception.public ExFull(int nResId)
nResId
- set this object's exception resource property to the
given resource.public ExFull(int nResId, String p1)
nResId
- resource id of the messagep1
- the single string parameter.public ExFull(String text, int resId)
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.
text
- Final (unformatted) text for the single error item
added to the exception.resId
- Resource ID.public ExFull(MsgFormat oFormat)
This c'tor is suitable only for resources whose associated message text is parameterized.
oFormat
- a Formatted message stringpublic ExFull(MsgFormatPos oFormat)
This c'tor is suitable only for resources whose associated message text is parameterized.
oFormat
- a Formatted message stringpublic int count()
count
in class ExceptionBase
public int firstResId()
public int getResId(int n)
n
- the index of the zero-based n'th item.public boolean hasResId(int nResId)
nResId
- the resource to search for.public void insert(ExFull source, boolean bAppend)
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.public ExErrItem item(int n)
item
in class ExceptionBase
n
- the index of zero-based exception to return.
Must be in the range 0 to Count() - 1.public void resolve()
resolve
in class ExceptionBase
Copyright © 2010 - 2020 Adobe. All Rights Reserved