public class ErrorSet
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorSet.Detail |
static class |
ErrorSet.Entry |
| Constructor and Description |
|---|
ErrorSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String text,
java.lang.String data)
Add an error
|
void |
add(java.lang.String text,
java.lang.String data,
java.lang.Throwable t) |
<X extends uk.ac.ed.epcc.webapp.content.ContentBuilder> |
addContent(X cb,
int nprint) |
java.lang.String |
details() |
java.lang.String |
details(int nprint)
Generate text precis of the errors
The data texts will only be printed if there are less than nprint values or
if nprint is -1.
|
java.util.Collection<ErrorSet.Detail> |
getAllErrorDetails()
Returns the details of all the errors that are stored in this
ErrorSet. |
java.util.Collection<ErrorSet.Entry> |
getEntries() |
void |
report(uk.ac.ed.epcc.webapp.AppContext c) |
void |
report(uk.ac.ed.epcc.webapp.logging.Logger l) |
void |
setName(java.lang.String name) |
int |
size() |
java.lang.String |
toString() |
void |
traceback(java.io.PrintStream s) |
public int size()
public void setName(java.lang.String name)
public void add(java.lang.String text,
java.lang.String data)
text - String general class or errordata - String specific details of this errorpublic void add(java.lang.String text,
java.lang.String data,
java.lang.Throwable t)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String details()
public java.lang.String details(int nprint)
nprint - target number of linespublic <X extends uk.ac.ed.epcc.webapp.content.ContentBuilder> X addContent(X cb,
int nprint)
public java.util.Collection<ErrorSet.Entry> getEntries()
ErrorSetpublic java.util.Collection<ErrorSet.Detail> getAllErrorDetails()
ErrorSet. Detail objects contain the data that
coursed the error and may contain the Throwable that
represents the error too. The number of times the error occured is not
recorded in a Detail object. For this kind of information, use
getEntries() instead.ErrorSetpublic void traceback(java.io.PrintStream s)
public void report(uk.ac.ed.epcc.webapp.AppContext c)
public void report(uk.ac.ed.epcc.webapp.logging.Logger l)