|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
de.infinityloop.util.UpcastException
public class UpcastException
Special Exception for infinity-loop products. This exception is able to
| Constructor Summary | |
|---|---|
UpcastException()
Constructor |
|
UpcastException(java.lang.Exception e)
Constructor |
|
UpcastException(LogEvent le)
Constructor |
|
UpcastException(LogEventCollector coll)
Constructor |
|
UpcastException(java.lang.String s)
Constructor |
|
| Method Summary | |
|---|---|
LogEventCollector |
extractSignificantEntries(int[] types,
int[] including,
int[] excluding)
This method extracts all LogEvent objects from this exception that are significant to you. |
void |
flushToLogger(LogSource lp)
This flushes all collected events to the specified LogSource, then clears the internal log event list. |
LogEventCollector |
getEntries()
get the entries of this exception as a List |
LogEvent |
getEntryByCode(int code)
Returns the (first) entry with the specified code or null if that message is not contained in this exception. |
java.lang.String |
getMessage()
|
int |
size()
|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UpcastException(java.lang.String s)
s - human readable messagepublic UpcastException()
public UpcastException(java.lang.Exception e)
e - the exception to wrappublic UpcastException(LogEventCollector coll)
coll - the LogEventCollector whose objects we should usepublic UpcastException(LogEvent le)
coll - the LogEventCollector whose objects we should use| Method Detail |
|---|
public LogEventCollector getEntries()
public int size()
public LogEventCollector extractSignificantEntries(int[] types,
int[] including,
int[] excluding)
null, all entries are examined. Otherwise, only those that match any of the
contained types are observed.
including. If
including is null, all entries pass this step.
excluding. If
excluding is null, all entries pass this step.
types - a variable length array of integers containing the type of LogEvent objects you are interested in.
E.g. passing new int[] { LogEvent.ERROR } will only report entries of type ERROR.
If you pass null, all entries are respected.including - Again in form of a variable size integer array, you can specify which error codes are interesting for you. If you pass null,
all error codes are observed.excluding - Same as for including, but lists the error codes you are not interested in.
null!)public LogEvent getEntryByCode(int code)
code - the code to look for
public java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic void flushToLogger(LogSource lp)
lp - the LogSource to send the log events to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||