|
||||||||||
| 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.extex.core.exception.GeneralException
org.extex.typesetter.exception.TypesetterException
org.extex.typesetter.exception.TypesetterHelpingException
public class TypesetterHelpingException
This class provides an Exception with the possibility to provide additional help on the error encoutered. Thus it has two levels of information: the first level is the message and the second level is the additional help.
Both information strings are mapped via the
Localizer apparatus.
The key provided to this Exception is used as a key to find the format in
the resource bundle. For the localized message of the exception it is used
plain and for the help the string ".help" is appended.
Consider the following lines in the resource (properties) file for the localizer:
abc.def = This is the message
abc.def.help = This is the help text. \
It can even span several lines.
Then the following instruction can savely be used:
throw new HelpingException(localizer, "abc.def");
With this exception up to three arguments can be used. The String value of those arguments are inserted into the message string for the placeholders {0}, {1}, and {2}. Consider the following format definition in the resource of the localizer:
ghi = This is the {0} message: {2}
Then the instruction
new HelpingException(localizer, "ghi", "first", "second", "third");
will produce an exception with the following localized message:
This is the first message: third
Note that some special rules hold for strings in resource bundles:
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
protected |
TypesetterHelpingException()
Creates a new object. |
|
TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag)
Creates a new object without variable arguments. |
|
TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1)
Creates a new object with one variable argument. |
|
TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1,
java.lang.String a2)
Creates a new object with two variable arguments. |
|
TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1,
java.lang.String a2,
java.lang.String a3)
Creates a new object with three variable arguments. |
| Method Summary | |
|---|---|
java.lang.String |
getHelp()
Getter for further help information. |
java.lang.String |
getLocalizedMessage()
Getter for further help information. |
| Methods inherited from class org.extex.core.exception.GeneralException |
|---|
getLocalizer, isProcessed, setProcessed |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, 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 |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
protected TypesetterHelpingException()
public TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag)
messageTag - the messagetheLocalizer - the localizer to use
public TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1)
messageTag - the messagea1 - the first argumenttheLocalizer - the localizer to use
public TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1,
java.lang.String a2)
messageTag - the messagea1 - the first argumenta2 - the second argumenttheLocalizer - the localizer to use
public TypesetterHelpingException(Localizer theLocalizer,
java.lang.String messageTag,
java.lang.String a1,
java.lang.String a2,
java.lang.String a3)
messageTag - the messagea1 - the first argumenta2 - the second argumenta3 - the third argumenttheLocalizer - the localizer to use| Method Detail |
|---|
public java.lang.String getHelp()
getHelp in class GeneralExceptionpublic java.lang.String getLocalizedMessage()
getLocalizedMessage in class java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||