1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
/** {@inheritDoc}
* @since 2.1
*/
public final ErrorHandler getErrorHandler() {
return (ErrorHandler) getClientProperty(ERROR_HANDLER_PROPERTY);
}
/** {@inheritDoc}
* @since 2.1
*/
public final void setErrorHandler(ErrorHandler value) {
if (value == null) {
value = this;
}
putClientProperty(ERROR_HANDLER_PROPERTY, value);
}
/** {@inheritDoc}
* @since 2.1
*/
public void handleError(Throwable t) {
ErrorHandler handler = getErrorHandler();
if ( (handler == null) || (handler == this)) {
ErrorMessageDialog.showDialog(t, this);
}
else {
handler.handleError(t);
}
}
/** {@inheritDoc}
* @since 2.1
*/
public void handleError(Throwable t, String message) {
ErrorHandler handler = getErrorHandler();
if ( (handler == null) || (handler == this)) {
ErrorMessageDialog.showDialog(message, t, this);
}
else {
handler.handleError(t, message);
}
}
/** {@inheritDoc}
* @since 2.1
*/
public void handleError(String message) {
ErrorHandler handler = getErrorHandler();
if ( (handler == null) || (handler == this)) {
ErrorMessageDialog.showDialog(message, this);
}
else {
handler.handleError(message);
}
} |
Partager