edu.isi.pegasus.common.util
public class FactoryException extends RuntimeException
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
The default classname that is associated with the exception.
|
protected String |
mClassname
The name of the class that was trying to be instantiated when this
error occured, or some other signifier like module name.
|
| Constructor and Description |
|---|
FactoryException(String msg)
Constructs a
FactoryException with no detail
message. |
FactoryException(String msg,
String classname)
Constructs a
FactoryException with the specified detailed
message. |
FactoryException(String msg,
String classname,
Throwable cause)
Constructs a
FactoryException with the
specified detailed message and a cause. |
FactoryException(String msg,
Throwable cause)
Constructs a
FactoryException with the
specified detailed message and a cause. |
| Modifier and Type | Method and Description |
|---|---|
String |
convertException()
Converts most of the common instantiation exceptions from the class
loader into an error message.
|
String |
convertException(int index)
Converts most of the common instantiation exceptions from the class
loader into an error message.
|
static String |
convertException(String classname,
Throwable e,
int index)
Converts most of the common instantiation exceptions from the class
loader into an error message.
|
String |
getClassname()
Returns the name of the class that was trying to be loaded when this
error occured, or some other signifier like a module name.
|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final String DEFAULT_NAME
protected String mClassname
public FactoryException(String msg)
FactoryException with no detail
message. The associated classname is set to value specified by
DEFAULT_NAME.msg - the detailed message.DEFAULT_NAMEpublic FactoryException(String msg, String classname)
FactoryException with the specified detailed
message.msg - is the detailed message.classname - the name of class that was trying to be instantiated or
some other signifier like module name.public FactoryException(String msg, Throwable cause)
FactoryException with the
specified detailed message and a cause. The associated classname is set
to value specified by DEFAULT_NAME.msg - is the detailed message that is to be logged.cause - is 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.DEFAULT_NAMEpublic FactoryException(String msg, String classname, Throwable cause)
FactoryException with the
specified detailed message and a cause.msg - is the detailed message that is to be logged.classname - the name of class that was trying to be instantiated.cause - is 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.public String convertException()
public String convertException(int index)
index - the index to start from.public static String convertException(String classname, Throwable e, int index)
classname - the class that was trying to be loaded or some other
signifier.e - the FactoryException that is thrown.index - the index to start from.public String getClassname()