| java.lang.Object java.lang.Throwable java.lang.Exception de.susebox.jtopas.TokenizerException
TokenizerException | public class TokenizerException extends Exception implements ThrowableList(Code) | |
Wrapper exception for all the problems that may occur while parsing. There
are IOExceptions, SQLExceptions etc. that can all happen when a
Tokenizer tries to extract the next token.
The class supports formats and format arguments beside the usual plain
throwable message string.
author: Heiko Blau |
_args | protected Object[] _args(Code) | | the parameters to be used when formatting the throwable message
|
_isWrapper | protected boolean _isWrapper(Code) | | If true this is only a wrapper throwable with the real one
being returned by
TokenizerException.nextThrowable , false for standalone,
nested or subsequent exceptions
|
_next | protected Throwable _next(Code) | | The wrapped, nested of next throwable.
|
TokenizerException | public TokenizerException(String msg)(Code) | | This constructor takes a simple message string like ordinary Java
java.lang.Throwable classes. This is the most convenient form to
construct an ThrowableList throwable.
Parameters: msg - message for this Throwable instance |
TokenizerException | public TokenizerException(Throwable ex)(Code) | | This constructor should be used for wrapping another throwable. While reading
data an IOException may occur, but the
Tokenizer interface requires a
TokenizerException . Simply use:
try {
...
} catch (IOException ex) {
throw new TokenizerException(ex);
}
Parameters: ex - the throwable to wrap |
TokenizerException | public TokenizerException(Throwable ex, String msg)(Code) | | If one likes to add ones own information to an throwable, this constructor is
the easiest way to do so. By using such an approach a throwable trace with useful
additional informations (which file could be found, what username is unknown)
can be realized:
try {
...
} catch (IOException ex) {
throw new TokenizerException(ex, "while tokenizing " + path);
}
Parameters: ex - the inner throwable Parameters: msg - throwable message |
TokenizerException | public TokenizerException(String fmt, Object[] args)(Code) | | This constructor takes a format string and its arguments. The format string
must have a form that can be used by
java.text.MessageFormat methods.
That means:
java.text.Message.format(fmt, args)
is similar to
new TokenizerException(fmt, args).getMessage();
Parameters: fmt - throwable message Parameters: args - arguments for the given format string |
TokenizerException | public TokenizerException(Throwable ex, String fmt, Object[] args)(Code) | | This is the most complex way to construct a TokenizerException .
An inner throwable is accompanied by a format string and its arguments.
Use this constructor in language-sensitive contexts or for formalized messages.
The meaning of the parameters is explained in the other constructors.
Parameters: ex - the inner throwable Parameters: fmt - throwable message Parameters: args - arguments for the given format string |
isWrapper | public boolean isWrapper()(Code) | | Check if this is only a throwable that wraps the real one. See
ThrowableList.isWrapper for details.
true if this is a wrapper throwable,false otherwise |
|
|