source: ether_megapoli/trunk/web/src/com/ether/WebException.java @ 530

Last change on this file since 530 was 530, checked in by vmipsl, 12 years ago

Simulations
Process ncdump
Sérialisation jaxb

File size: 1.9 KB
Line 
1package com.ether;
2
3/**
4 * @author vmipsl
5 * @date 02 feb 2011
6 */
7public class WebException
8        extends FormattedException
9{
10    public WebException( final Enum<? extends Code> code )
11    {
12        super( code );
13    }
14
15    public WebException( final Throwable throwable )
16    {
17        super( throwable );
18    }
19
20    public WebException( final Enum<? extends Code> code, final Throwable throwable, final Object... parameters )
21    {
22        this( code, throwable.getMessage(), throwable, parameters );
23    }
24
25    public WebException( final Enum<? extends Code> code, final String message, final Object... parameters )
26    {
27        super( code, message, DEFAULT_THROWABLE, parameters );
28    }
29
30    protected WebException( final Enum<? extends Code> code, final String message, final Throwable throwable, final Object... parameters )
31    {
32        super( formatThrowable( code, message, throwable ), throwable, parameters );
33    }
34
35    public WebException( final String message, final Throwable throwable )
36    {
37        super( message, throwable );
38    }
39
40    public static enum WebCode
41            implements Code
42    {
43        ERROR_UNSUPPORTED_UTF8_ENCODING,
44        ERROR_NO_REQUEST_HANDLING_METHOD,
45        ERROR_NUMBER_OF_PARAM_TYPES_NOT_EQUAL_TO_PARAM_ANNOTATIONS,
46        INVALID_DATE,
47        PLATEFORM_OR_PARAMETER_IS_NULL,
48        PARAMETER_IS_NULL,
49        USER_ALREADY_EXISTS,
50        ERROR_EMAIL_CANNOT_BE_SEND,
51        ERROR_ENCRYPT_PASSWORD,
52        ERROR_NON_ACCESS_TO_BO_AUTHORIZED,
53        ERROR_DISPLAY_AJAX,
54        MCO_ALREADY_EXISTS,
55        ERROR_NO_USER_FOUND,
56        ERROR_NO_REQUEST_FOUND,
57        ERROR_NO_JEU_FOUND,
58        JEU_NOT_CORRECT,
59        DOWNLOAD_DIRECTORY_DOESNOT_EXISTS,
60        ERROR_NO_CLEAN_LOCALISATION_AND_FLAG,
61        ERROR_TO_READ_FILE_PROPERTIES,
62        ERROR_PROCESS_SIMULATION_NCDUMP,
63        ERROR_INSERT_HEADER
64    }
65
66    private static final Throwable DEFAULT_THROWABLE = null;
67}
Note: See TracBrowser for help on using the repository browser.