EAF 7.4 API

com.lutris.util
Class ConfigException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.lutris.util.KeywordValueException
              extended by com.lutris.util.ConfigException
All Implemented Interfaces:
java.io.Serializable

public class ConfigException
extends KeywordValueException

Exception class thrown by class Config. If a syntax error is found in the configuration input stream, or if a component expects a data format for which a configuration element cannot be converted, then this exception is thrown to indicate the error.

Since:
Soda1.0
Version:
$Revision: 1.1 $
Author:
John Marco
See Also:
Config, Serialized Form

Field Summary
static int COUNT
          The reason field may contain this value to indicate that a component expects a different number of elements than are provided in the configuration file for a particular key.
static int FORMAT
          The reason field may contain this value to indicate that a configuration element could not be converted from its internal string form to the requested type.
static int NOT_FOUND
          The reason field may contain this value to indicate that a syntax error in the configuration input file or stream caused this exception.
 int reason
          Indicates the cause (if known) of the current exception.
static int SYNTAX
          The reason field may contain this value to indicate that a syntax error in the configuration input file or stream caused this exception.
static int UNKNOWN
          The reason field may contain this value to indicate that the cause of the current exception is unknown.
 
Constructor Summary
ConfigException()
          Creates a new ConfigException object with no informational string and a reason field of UNKNOWN.
ConfigException(int r, java.lang.String s)
          Creates a new ConfigException object with the specified informational string and the specified reason field.
ConfigException(java.lang.String s)
          Creates a new ConfigException object with the specified informational string and a reason field of UNKNOWN.
ConfigException(java.lang.String msg, java.lang.Throwable cause)
          Constructs a new exception with the specified cause and a detail message.
ConfigException(java.lang.Throwable cause)
          Constructs a new exception with the specified cause.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
The reason field may contain this value to indicate that the cause of the current exception is unknown.

See Also:
reason, Constant Field Values

NOT_FOUND

public static final int NOT_FOUND
The reason field may contain this value to indicate that a syntax error in the configuration input file or stream caused this exception.

See Also:
reason, Constant Field Values

SYNTAX

public static final int SYNTAX
The reason field may contain this value to indicate that a syntax error in the configuration input file or stream caused this exception.

See Also:
reason, Constant Field Values

COUNT

public static final int COUNT
The reason field may contain this value to indicate that a component expects a different number of elements than are provided in the configuration file for a particular key.

See Also:
reason, Constant Field Values

FORMAT

public static final int FORMAT
The reason field may contain this value to indicate that a configuration element could not be converted from its internal string form to the requested type.

See Also:
reason, Constant Field Values

reason

public int reason
Indicates the cause (if known) of the current exception.

See Also:
UNKNOWN, SYNTAX, COUNT, FORMAT
Constructor Detail

ConfigException

public ConfigException()
Creates a new ConfigException object with no informational string and a reason field of UNKNOWN.

See Also:
reason

ConfigException

public ConfigException(java.lang.String s)
Creates a new ConfigException object with the specified informational string and a reason field of UNKNOWN.

Parameters:
s - Informational string to store in the exception object.
See Also:
reason

ConfigException

public ConfigException(java.lang.Throwable cause)
Constructs a new exception with the specified cause.

Parameters:
cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). A null value is permitted, and indicates that the cause is nonexistent or unknown.

ConfigException

public ConfigException(java.lang.String msg,
                       java.lang.Throwable cause)
Constructs a new exception with the specified cause and a detail message.

Parameters:
msg - A detailed message describing the expection.
cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). A null value is permitted, and indicates that the cause is nonexistent or unknown.

ConfigException

public ConfigException(int r,
                       java.lang.String s)
Creates a new ConfigException object with the specified informational string and the specified reason field.

Parameters:
s - Informational string to store in the exception object.
r - Reason code to store in the reason field.
See Also:
reason

EAF 7.4 API