|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.malai.error.ErrorCatcher
public final class ErrorCatcher
The singleton ErrorCatcher permits to Malai code to send errors to a gatherer.
The ErrorCatcher then send the catched exception to an ErrorNotifier (if one is
defined). This is useful to gather Malai errors into a third-part application.
For instance, a develope can define his own error manager which implements
the ErrorNotifier interface and which is registered to the ErrorCatcher in order
to manage both the Malai exceptions and the third-part application errors.
This file is part of Malai.
Copyright (c) 2009-2012 Arnaud BLOUIN
Malai is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
Malai is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
07/23/2011
Field Summary | |
---|---|
static ErrorCatcher |
INSTANCE
The singleton ErrorCatcher. |
private ErrorNotifier |
notifier
The notifier object. |
Constructor Summary | |
---|---|
private |
ErrorCatcher()
Creates the error catcher. |
Method Summary | |
---|---|
ErrorNotifier |
getErrorNotifier()
|
void |
reportError(java.lang.Exception exception)
Gathers malai exceptions. |
void |
setNotifier(ErrorNotifier notifier)
Sets the notifier that will be notified about Malai errors. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ErrorCatcher INSTANCE
private ErrorNotifier notifier
Constructor Detail |
---|
private ErrorCatcher()
Method Detail |
---|
public void setNotifier(ErrorNotifier notifier)
notifier
- The notifier that will be notified about errors. Can be null.public ErrorNotifier getErrorNotifier()
public void reportError(java.lang.Exception exception)
exception
- The errors to gather. Nothing is done if null or if no
notifier is defined.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |