|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ejen.EjenErrors
Ejen errors class utility.
Nested Class Summary | |
static class |
EjenErrors.EjenError
Class that represents one error. |
Field Summary | |
static String |
EJEN_INFORMATION
|
static String |
ID_COLUMN
|
static String |
ID_FILE
|
static String |
ID_LINE
|
static String |
ID_MESSAGE
|
static String |
ID_NOTE
|
static String |
ID_PUBLIC_ID
|
static String |
ID_SYSTEM_ID
|
static String |
LINE_SEPARATOR
|
static String |
STACK_TRACE
|
Method Summary | |
static EjenErrors.EjenError[] |
get(String file,
String note,
Throwable t)
Returns an EjenError array (no stack trace). |
static EjenErrors.EjenError[] |
get(String file,
String note,
Throwable t,
boolean printStackTrace)
Returns an EjenError array. |
static String |
toString(EjenErrors.EjenError[] errors)
Returns a String representation of the errors argument. |
static String |
toString(String file,
String note,
Throwable t)
Identical to toString(get(file, note, t, false)) . |
static String |
toString(String file,
String note,
Throwable t,
boolean printStackTrace)
Identical to toString(get(file, note, t, printStackTrace)) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String EJEN_INFORMATION
public static final String STACK_TRACE
public static final String ID_FILE
public static final String ID_NOTE
public static final String ID_MESSAGE
public static final String ID_PUBLIC_ID
public static final String ID_SYSTEM_ID
public static final String ID_LINE
public static final String ID_COLUMN
public static final String LINE_SEPARATOR
Method Detail |
public static EjenErrors.EjenError[] get(String file, String note, Throwable t)
get(String file, String note, Throwable t, boolean printStackTrace)
.
file
- name of the file where the error occured.note
- additional message.t
- the exception to be analysed in order to retrieve all
embedded exceptions information.
public static EjenErrors.EjenError[] get(String file, String note, Throwable t, boolean printStackTrace)
If the file or the note argument is not null, the first EjenError will be an "Ejen information" with the properties "file" or "note" filled in (at least one those properties, depending on nullity).
If the t argument is not null, the following EjenError(s) will have the name of the exception as name and (if not null) the property "message" set to the exception message. While there is an embedded exception in the current exception, a new EjenError is appended to the array (with specific information from the embedded exception) and the embedded exception becomes the current exception. If one of those exception is a SAXParseException or a TransformerException, the properties "column", "line", "public-id" and "system-id" may be included as well (depending on nullity).
If printStackTrace is true, an EjenError is finally appended to the array with name set to the last embedded exception name and a "stack-trace" property is added (whose value is the stack trace).
file
- name of the file where the error occured.note
- additional message.t
- the exception to be analysed in order to retrieve all
embedded exceptions information.printStackTrace
- should stack trace be provided or not.
public static String toString(EjenErrors.EjenError[] errors)
If the errors argument is null, "errors.null" is returned.
Otherwise, for each EjenError in the array, a String with the following structure is appended:
[<name of the EjenError>] {
<name of property>: <value of property>
<name of property>: <value of property>
...
}
errors
- an EjenError array.
public static String toString(String file, String note, Throwable t)
toString(get(file, note, t, false))
.
file
- name of the file where the error occured.note
- additional message.t
- the exception to be analysed in order to retrieve all
embedded exceptions information.
public static String toString(String file, String note, Throwable t, boolean printStackTrace)
toString(get(file, note, t, printStackTrace))
.
file
- name of the file where the error occured.note
- additional message.t
- the exception to be analysed in order to retrieve all
embedded exceptions information.printStackTrace
- should stack trace be provided or not.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |