|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
de.infinityloop.util.ILException
public class ILException
Special Exception for infinity-loop products. This exception is able to
Constructor Summary | |
---|---|
ILException()
Constructor |
|
ILException(java.lang.Exception e)
Constructor |
|
ILException(int code,
java.lang.Object[] params)
Constructor |
|
ILException(int code,
java.lang.String msg)
Constructor |
|
ILException(int code,
java.lang.String msg,
java.lang.Exception e)
Constructor |
|
ILException(NotificationCollector coll)
Constructor |
|
ILException(java.lang.String s)
Constructor |
Method Summary | |
---|---|
NotificationCollector |
extractSignificantEntries(int[] types,
int[] including,
int[] excluding)
This method tells whether this exception contains a LogEntry that is significant for you. |
int |
getCode(int i)
|
java.lang.Throwable |
getEmbeddedException(int i)
|
NotificationCollector |
getEntries()
get the entries of this exception as a List |
NotificationCollector |
getEntriesByType(int type)
Returns an ArrayList object that holds all those LogEntry objects that are of the specified type. |
LogEntry |
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()
|
java.lang.String |
getMessage(int i)
|
java.lang.Object[] |
getParameters(int i)
retrieves the parameter objects for the respective error message |
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 ILException(java.lang.String s)
s
- human readable messagepublic ILException()
public ILException(java.lang.Exception e)
e
- the exception to wrappublic ILException(NotificationCollector coll)
coll
- the notification collector whose objects we should usepublic ILException(int code, java.lang.String msg)
code
- the error/warning codemsg
- the error/message messagepublic ILException(int code, java.lang.Object[] params)
code
- the error/warning codeparams
- the parameters for formatting the message templatepublic ILException(int code, java.lang.String msg, java.lang.Exception e)
code
- the error/warning codemsg
- the error/message messagee
- wrapped exceptionMethod Detail |
---|
public NotificationCollector getEntries()
public int size()
public java.lang.Throwable getEmbeddedException(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- index in list of entries
java.lang.ArrayIndexOutOfBoundsException
- when the index is out of boundspublic java.lang.Object[] getParameters(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- index in list of entries
null
if none was specified
java.lang.ArrayIndexOutOfBoundsException
- when the index is out of boundspublic int getCode(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- index in list of entries
java.lang.ArrayIndexOutOfBoundsException
- when the index is out of boundspublic java.lang.String getMessage(int i) throws java.lang.ArrayIndexOutOfBoundsException
i
- index in list of entries
java.lang.ArrayIndexOutOfBoundsException
- when the index is out of boundspublic NotificationCollector getEntriesByType(int type)
type
- the type of the entries to retrieve, one of:
public NotificationCollector 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 LogEntry()s you are interested in.
E.g. passing new int[] { NotificationCollector.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 java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public LogEntry getEntryByCode(int code)
code
- the code to look for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |