OpenNebulaConfigurationError.java

The new Error subclass. - Gian Uberto Lauri, 04/11/2011 05:16 PM

Download (1.52 KB)

 
1
package org.opennebula.client;
2

    
3
/**
4
 * OpenNebulaConfigurationException
5
 *
6
 * Thrown whenever the configuration  contains errors that prevent the
7
 * instantiations of a Client instance.
8
 *
9
 * Why an Error ? There's no chance you can fix the situation from
10
 * within the code, you have to stop the JVM, fix the configuration
11
 * and restart.
12
 *
13
 * "An Error is a subclass of Throwable that indicates serious
14
 * problems that a reasonable application should not try to
15
 * catch. Most such errors are abnormal conditions. The ThreadDeath
16
 * error, though a "normal" condition, is also a subclass of Error
17
 * because most applications should not try to catch it.
18
 *
19
 * A method is not required to declare in its throws clause any
20
 * subclasses of Error that might be thrown during the execution of
21
 * the method but not caught, since these errors are abnormal
22
 * conditions that should never occur."
23
 * 
24
 * (from Error class documentation)
25
 *
26
 * Why not RuntimeException ? Because these execptions (also known as
27
 * "ProgremmerErrorExceptions") may happen during the normal operation
28
 * of a JVM and some sort of corrective action may be taken (even if
29
 * this action is "correct the code and recompile").
30
 *
31
 * Created: Mon Apr 11 18:43:53 2011
32
 *
33
 * @author <a href="mailto:saint@eng.it">Gian Uberto Lauri</a>
34
 * @version $Revision$
35
 */
36
public class OpenNebulaConfigurationError extends Error {
37

    
38
        /**
39
         * Creates a new instance of <code>OpenNebulaConfigurationError</code> .
40
         *
41
         */
42
        public OpenNebulaConfigurationError(String message) {
43
                super(message);
44
        }
45

    
46
}