source: ether_statistics/service/interface/com/ether/ServiceException.java @ 569

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

Nouveau projet

File size: 2.0 KB
Line 
1package com.ether;
2
3
4/**
5 * @author vmipsl
6 * @date 28 jan 2011
7 */
8@SuppressWarnings("serial")
9public class ServiceException
10        extends FormattedException
11{
12    public ServiceException( final Enum<? extends Code> code, final Throwable cause, final Object... parameters )
13    {
14        this( code, cause.getMessage(), cause, parameters );
15    }
16
17    protected ServiceException( final Enum<? extends Code> code, final String message, final Throwable throwable, final Object... parameters )
18    {
19        super( formatThrowable( code, message, throwable ), throwable, parameters );
20    }
21
22    public ServiceException( final Enum<? extends Code> code, final String message, final Object... parameters )
23    {
24        super( code, message, null, parameters );
25    }
26
27    public ServiceException( final String localizedMessage, final Throwable exceptionThrowable )
28    {
29        super( localizedMessage, exceptionThrowable );
30    }
31
32    public ServiceException( final Enum<? extends Code> code, final String message, final Throwable exceptionThrowable )
33    {
34        super( code, message, exceptionThrowable );
35    }
36
37    public static enum ServiceCode
38            implements Code
39    {
40        UNKNOWN,
41        PERSISTENCE,
42        SERVICE_PROBLEM,
43        PLATEFORM_NOT_FOUND,
44        PLATEFORM_IS_NULL,
45        PARAMETER_NOT_FOUND,
46        PARAMETER_IS_NULL,
47        VALUE_NOT_FOUND,
48        LEGEND_LAYER_NOT_FOUND,
49        DATE_NOT_FOUND,
50        USER_NOT_FOUND,
51        WAITING_USER_NOT_FOUND,
52        NO_DATA,
53        PERSON_NOT_FOUND,
54        REQUEST_NOT_FOUND,
55        JEU_NOT_FOUND,
56        JEU_NOT_CORRECT,
57        PROPERTIES_FILE_NOT_FOUND,
58        PROPERTIES_FILE_NOT_READABLE,
59        ERROR_INSERT_PRINCIPAL,
60        ERROR_IN_FILE_TO_INSERT,
61        ERROR_PROCESS_SIMULATION_NCDUMP,
62        ERROR_PROCESS_SIMULATION_NCDUMP_WAIT,
63        ERROR_PROPERTY,
64        ERROR_JAXB,
65        ERROR_INSERT_VARIABLE,
66        DIMENSION_NOT_FOUND,
67        ATTRIBUTE_NOT_FOUND,
68        VARIABLE_NOT_FOUND,
69        SIMULATION_NOT_FOUND,
70        MODEL_NOT_FOUND
71    }
72}
Note: See TracBrowser for help on using the repository browser.