|
|||||||||
| Home >> All >> com >> eireneh >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.eireneh.util
Class LucidException

java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.eireneh.util.LucidException
- All Implemented Interfaces:
- java.io.Serializable
- public class LucidException
- extends java.lang.Exception
A LucidException adds 3 concepts to a base Exception, that of a wrapped Exception, that of internationalised (i18n) messages, and that of an internal string which is for debugging/logging purposes.
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 functionallity is expected to be added to the base Exception class in JDK 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.
The third addition is that of a debug/logging string. Some information about what went wrong is not for the eyes of the user (especially in a web environment) but we may like to remember what broke.
|
Distribution Licence: Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below. The copyright to this program is held by it's authors. |
- Version:
- D0.I0.T0
| Nested Class Summary |
| Nested classes inherited from class java.lang.Throwable |
|
| Field Summary | |
protected java.lang.Throwable |
ex
An embedded exception |
protected java.lang.String |
internal
The array of parameters |
protected java.lang.Object[] |
params
The array of parameters |
protected static java.util.ResourceBundle |
res
The resource hash |
| Fields inherited from class java.lang.Exception |
|
| Fields inherited from class java.lang.Throwable |
|
| Constructor Summary | |
LucidException(java.lang.String msg)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Object[] params)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Object[] params,
java.lang.String internal)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.String internal)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Throwable ex)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Throwable ex,
java.lang.Object[] params)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Throwable ex,
java.lang.Object[] params,
java.lang.String internal)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
LucidException(java.lang.String msg,
java.lang.Throwable ex,
java.lang.String internal)
All LucidExceptions are constructed with references to resources in an I18N properties file. |
|
| Method Summary | |
java.lang.String |
getDetailedMessage()
Accessor of the full detailed version of the string |
java.lang.Throwable |
getException()
The nested Exception (is any) |
java.lang.String |
getInternalMessage()
Accessor for the message private to the developers |
java.lang.String |
getMessage()
We only unravel the message when we need to to save time |
static void |
setResourceBundleName(java.lang.String name)
A way of setting the name of the resource bundle to use. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, 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 |
ex
protected java.lang.Throwable ex
- An embedded exception
params
protected java.lang.Object[] params
- The array of parameters
internal
protected java.lang.String internal
- The array of parameters
res
protected static java.util.ResourceBundle res
- The resource hash
| Constructor Detail |
LucidException
public LucidException(java.lang.String msg)
- All LucidExceptions are constructed with references to resources in
an I18N properties file.
LucidException
public LucidException(java.lang.String msg, java.lang.Throwable ex)
- All LucidExceptions are constructed with references to resources in
an I18N properties file.
LucidException
public LucidException(java.lang.String msg, java.lang.Object[] params)
- All LucidExceptions are constructed with references to resources in
an I18N properties file. This version allows us to add parameters
LucidException
public LucidException(java.lang.String msg, java.lang.Throwable ex, java.lang.Object[] params)
- All LucidExceptions are constructed with references to resources in
an I18N properties file. This version allows us to add parameters
LucidException
public LucidException(java.lang.String msg, java.lang.String internal)
- All LucidExceptions are constructed with references to resources in
an I18N properties file.
LucidException
public LucidException(java.lang.String msg, java.lang.Throwable ex, java.lang.String internal)
- All LucidExceptions are constructed with references to resources in
an I18N properties file.
LucidException
public LucidException(java.lang.String msg, java.lang.Object[] params, java.lang.String internal)
- All LucidExceptions are constructed with references to resources in
an I18N properties file. This version allows us to add parameters
LucidException
public LucidException(java.lang.String msg, java.lang.Throwable ex, java.lang.Object[] params, java.lang.String internal)
- All LucidExceptions are constructed with references to resources in
an I18N properties file. This version allows us to add parameters
| Method Detail |
getMessage
public java.lang.String getMessage()
- We only unravel the message when we need to to save time
getDetailedMessage
public java.lang.String getDetailedMessage()
- Accessor of the full detailed version of the string
getInternalMessage
public java.lang.String getInternalMessage()
- Accessor for the message private to the developers
getException
public java.lang.Throwable getException()
- The nested Exception (is any)
setResourceBundleName
public static final void setResourceBundleName(java.lang.String name)
- A way of setting the name of the resource bundle to use. The default
bundle is named com.eireneh.resources.Exception
|
|||||||||
| Home >> All >> com >> eireneh >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC