|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.crosswire.common.util.LucidException
public class LucidException
A LucidException adds 2 concepts to a base Exception, that of a wrapped Exception, that of internationalized (i18n) messages.
The first addition is the concept of an optional wrapped Exception (actually a Throwable), which describes what caused this to happen. Any well defined interface will define the exact exceptions that the methods of that interface will throw, and not leave it to the ambiguous "throws Exception". However the interface should have no idea how it will be implemented and so the details of exactly what broke under the covers gets lost. With LucidException this detail is kept in the wrapped Exception. This functionality has been added to the base Exception class in J2SE 1.4
The second addition is the concept of i18n messages. Normal Exceptions are created with an almost random string in the message field, LucidExceptions define this string to be a key into a resource bundle, and to help formatting this string there is an optional Object array of format options. There is a constructor that allows us to specify no i18n lookup, which is useful if this lookup may have been done already.
The GNU Lesser General Public License for details.
,
LucidRuntimeException
,
Serialized FormField Summary | |
---|---|
private static long |
serialVersionUID
Serialization ID |
Constructor Summary | |
---|---|
LucidException(String msg)
All LucidExceptions are constructed with references to resources in an i18n properties file. |
|
LucidException(String msg,
Throwable cause)
All LucidExceptions are constructed with references to resources in an i18n properties file. |
Method Summary | |
---|---|
String |
getDetailedMessage()
Accessor of the full detailed version of the string |
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 |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public LucidException(String msg)
msg
- The resource id to readpublic LucidException(String msg, Throwable cause)
msg
- The resource id to readcause
- The cause of the exceptionMethod Detail |
---|
public String getDetailedMessage()
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |