Revision 42d326df
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/event/error/ErrorTypeHandler.java | ||
---|---|---|
1 |
// $Id$ |
|
2 | 1 |
/** |
3 | 2 |
* Copyright (C) 2018 EDIT |
4 | 3 |
* European Distributed Institute of Taxonomy |
... | ... | |
16 | 15 |
* see {@link DelegatingErrorHandler} |
17 | 16 |
* |
18 | 17 |
* @author freimeier |
19 |
* @date 26.02.2018 |
|
20 | 18 |
* |
21 | 19 |
*/ |
22 |
public abstract class ErrorTypeHandler<E extends Exception> implements ErrorHandler {
|
|
20 |
public abstract class ErrorTypeHandler<E extends Throwable> implements ErrorHandler {
|
|
23 | 21 |
|
24 |
private static final long serialVersionUID = 1782060185842059311L; |
|
22 |
private static final long serialVersionUID = 1782060185842059311L;
|
|
25 | 23 |
|
26 |
/* (non-Javadoc) |
|
27 |
* @see com.vaadin.server.ErrorHandler#error(com.vaadin.server.ErrorEvent) |
|
28 |
*/ |
|
29 |
@Override |
|
30 |
public final void error(ErrorEvent event) { |
|
31 |
handleError((E) event.getThrowable().getCause()); |
|
24 |
public abstract Class<E> supports(); |
|
32 | 25 |
|
26 |
public final void handleError(ErrorEvent event, E throwable){ |
|
27 |
error(event); |
|
28 |
exception(throwable); |
|
33 | 29 |
} |
34 | 30 |
|
35 |
public abstract void handleError(E exception); |
|
31 |
/** |
|
32 |
* @param exception |
|
33 |
*/ |
|
34 |
public abstract void exception(E throwable); |
|
36 | 35 |
} |
37 | 36 |
|
38 | 37 |
|
Also available in: Unified diff
ref #7241 DelegatingErrorHandler more generically