public static class ErrorCollector.ErrorInfos
extends java.lang.Object
| Constructor and Description |
|---|
ErrorInfos()
Class that stores error info for one error (exception) type.
|
| Modifier and Type | Method and Description |
|---|---|
ErrorCollector.ErrorInfo |
addError(java.lang.Exception ex)
Stores - if no error (exception) of the given type occurred until now or -
otherwise updates info about the given error.
|
ErrorCollector.ErrorInfo |
addError(java.lang.Exception ex,
java.lang.String msg) |
void |
dumpToLog(org.apache.log4j.Logger log)
Dumps the information from this
ErrorInfos instance to the given
Logger. |
void |
dumpToLog(org.apache.log4j.Logger log,
org.apache.log4j.Level level) |
long |
getErrorCount()
Gets the total count of all errors (exceptions) that have been stored yet.
|
ErrorCollector.ErrorInfo |
getErrorInfo(java.lang.Exception ex)
Gets stored info about a specific kind or error (exception).
|
ErrorCollector.ErrorInfo |
getOldestError()
Gets stored info about the oldest stored error.
|
ErrorCollector.ErrorInfo |
getYoungestError()
Gets stored info about the most recent stored error.
|
public ErrorInfos()
public ErrorCollector.ErrorInfo addError(java.lang.Exception ex)
ex - the Exception that occurred and for which info should
be initially stored or updatedmsg - an optional, additional message that should be stored with the error; should a previous message for
the exception type exist it will be overwritten with this new one, if one is givenErrorInfo instance which stores info about the given
error typepublic ErrorCollector.ErrorInfo addError(java.lang.Exception ex, java.lang.String msg)
public ErrorCollector.ErrorInfo getErrorInfo(java.lang.Exception ex)
ex - the Exception for which collected info is wantedErrorInfo which collects info about the given
Exception or null if no error of that type has been stored yetpublic ErrorCollector.ErrorInfo getOldestError()
ErrorInfo for the oldest stored error or null if no
error has been stored yetpublic ErrorCollector.ErrorInfo getYoungestError()
ErrorInfo for the most recent stored error or null if
no error has been stored yetpublic long getErrorCount()
public void dumpToLog(org.apache.log4j.Logger log)
ErrorInfos instance to the given
Logger. Mainly for debugging purposes.log - the Logger to dump the info topublic void dumpToLog(org.apache.log4j.Logger log,
org.apache.log4j.Level level)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.