|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.ErrorHandler
public final class ErrorHandler
Handles errors that occurs in the application. Thread-safe.
| Nested Class Summary | |
|---|---|
static class |
ErrorHandler.ErrorInfo
Contains information about an error. |
| Constructor Summary | |
|---|---|
ErrorHandler(AmbientApplication app)
Creates new handler instance. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all recorded error messages. |
void |
error(Class<?> sender,
boolean error,
String message,
Throwable cause)
An error occurred. |
List<ErrorHandler.ErrorInfo> |
getErrors()
Returns a new copy of the recorded error list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
ErrorHandler(AmbientApplication app)
app - owner application.| Method Detail |
|---|
public void error(Class<?> sender,
boolean error,
String message,
Throwable cause)
sender - the sender.error - error if true, warning if false.message - the message to show. The message will be followed by a new
line, the Cause: string and the
Throwable.getMessage() if the cause is not
null.cause - optional cause.public List<ErrorHandler.ErrorInfo> getErrors()
null list of errors.public void clear()
Handler thread.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||