Warning: Can't use blame annotator:
svn blame failed on trunk/src/tmcsim/common/SimulationException.java: ("Can't find a temporary directory: Internal error", 20014)

source: tmcsimulator/trunk/src/tmcsim/common/SimulationException.java @ 2

Revision 2, 3.9 KB checked in by jdalbey, 10 years ago (diff)

Initial Import of project files

RevLine 
1package tmcsim.common;
2
3
4
5/**
6 * Exception class used to handle exceptions thrown within the CAD Simulation
7 * software relating to connection and initialization errors.  Each error is
8 * defined by this class' public static final Strings.
9 *
10 * @author Matthew Cechini (mcechini@calpoly.edu)
11 * @version $Date: 2006/06/06 20:46:41 $ $Revision: 1.7
12 */
13@SuppressWarnings("serial")
14public class SimulationException extends Exception {
15   
16
17    /**
18     * Exception error when a socket or RMI connection to the CAD Simulator fails.<br>
19     * Error Message: "Unable to connect to the CAD Simulator."
20     */
21    public static final String CAD_SIM_CONNECT = "Unable to connect to the CAD Simulator.";
22   
23    /**
24     * Exception error when a socket or RMI communication to the CAD Simulator fails.<br>
25     * Error Message: "Unable to communicate with the CAD Simulator."
26     */
27    public static final String CAD_SIM_COMM = "Unable to communicate with the CAD Simulator.";
28   
29    /**
30     * An error has occured in binding to a socket or rmi port.<br>
31     * Error Message: "An error has occured in establishing communications."
32     */
33    public static final String BINDING     = "An error has occured in establishing communications.";
34
35    /**
36     * Exception error when initialization of an object from a properties file fails.<br>
37     * Error Message: "Unable to complete initialization, program exiting."
38     */
39    public static final String INITIALIZE_ERROR = "Unable to complete initialization, program exiting.";
40
41    /**
42     * Exception error when registering the CAD Client with the CAD Simulator fails.<br>
43     * Error Message: "Unable to complete CAD Client registration, program exiting."
44     */
45    public static final String REGISTER_ERROR = "Unable to complete CAD Client registration, program exiting.";
46
47    /**
48     * Exception error if the SimulationManagerModel is initialized without
49     * the view componenta socket or RMI connection to the CAD Simulator fails.<br>
50     * Error Message: "Unable to connect to the CAD Simulator."
51     */
52    public static final String NULL_VIEW = "Unable to connect to the CAD Simulator.";
53       
54    /**
55     * Exception error when a connection to the ATMS server cannot be established.<br>
56     * Error Message: "A connection to the ATMS server could not be established"
57     */   
58    public static final String ATMS_UNREACHABLE = "A connection to the ATMS server could not be established";
59   
60    /**
61     * Exception error to notify the user that a connection to Paramics has
62     * not been established.<br>
63     * Error Message: "A connection to Paramics has not been established."
64     */
65    public static final String PARAMICS_NOT_CONNECTED = "A connection to Paramics has not been established.";   
66   
67    /**
68     * Exception error when there is an error parsing the script file.<br>
69     * Error Message: "Unable to parse the script file."
70     */
71    public static final String INVALID_SCRIPT_FILE = "Unable to parse the script file.";   
72       
73    /**
74     * Constructor accepting a String message.
75     *
76     * @param newMessage Exception message
77     */ 
78    public SimulationException(String newMessage) {
79        super(newMessage);
80    }   
81   
82    /**
83     * Constructor accepting a String message and Throwable cause.
84     *
85     * @param newMessage Exception message
86     * @param e Cause of the exception.
87     */ 
88    public SimulationException(String newMessage, Throwable e) {
89        super(newMessage, e);
90    }       
91
92    /**
93     * Constructor accepting a String message, additional info object, and Throwable cause.
94     *
95     * @param newMessage Exception message
96     * @param addlInfo Additional info
97     * @param e Cause of the exception.
98     */ 
99    public SimulationException(String newMessage, Object addlInfo, Throwable e) {
100        super(newMessage + " <" + addlInfo.toString() + ">", e);
101    }       
102   
103       
104}
Note: See TracBrowser for help on using the repository browser.