|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception jpicedt.graphic.io.parser.ParserException jpicedt.format.input.util.REParserException
public class REParserException
An Exception manager to be used by RE-parsers (i.e. those built on top of AbstractRegularExpression's).
The main purpose is to build a meaningfull string so that the user may be able to precisely locate the source of the syntax error and what kind of error it is.
See also: key-entries starting with "parser-exception" in jpicedt/lang/i18n_xx.properties resource files.
[Developpers] : new exceptions should be implemented as inner static classes so as to reduce namespace pollution. Simply inherit your class from REParserException, feeding the mother-class constructor with a key-entry string of your choice, then add an appropriate key/value pair in EACH jpicedt/lang.i18n_xx.properties resource file.
Nested Class Summary | |
---|---|
static class |
REParserException.BeginGroupMismatch
a "begin group" has no matching "end group" |
static class |
REParserException.BlockMismatch
a closing delimiter has no matching opening delimiter (see EnclosingExpression) |
static class |
REParserException.EndGroupMismatch
a "end group" has no matching "begin group" |
static class |
REParserException.EndOfPicture
the end of the picture environment was encoutered. |
static class |
REParserException.EndOfPictureNotFound
the end of the picture environment wasn't found in the current Reader. |
static class |
REParserException.EOF
the end of the file (or the underlying Reader) was reached abnormally, e.g. in the course of a AbstractRegularExpression.interpret() operation. |
static class |
REParserException.IncompleteSequence
signals an incomplete SequenceExpression |
static class |
REParserException.NotFoundInFile
a mandatory expression wasn't found |
static class |
REParserException.NumberFormat
aka NumberFormatException |
static class |
REParserException.NumberSign
signals an error concerning the sign of a number (see NumericalExpression) |
static class |
REParserException.SyntaxError
a syntax error has occured ; should be used as a last resort, when no specific exception message applies. |
Nested classes/interfaces inherited from class jpicedt.graphic.io.parser.ParserException |
---|
ParserException.UnrecognizedFileFormat |
Constructor Summary | |
---|---|
REParserException(String message,
Context context)
create a new REParserException with the specified error code and line number. |
|
REParserException(String message,
Context context,
AbstractRegularExpression expr)
create a new REParserException, raised by the given Expression |
Method Summary | |
---|---|
String |
getLocalizedMessage()
Convenience call to getMessage() |
String |
getMessage()
Return a meaningfull, human-readable, properly localized description of this exception |
String |
toString()
Convenience call to getMessage() |
Methods inherited from class jpicedt.graphic.io.parser.ParserException |
---|
localize |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public REParserException(String message, Context context)
message
- used for localization purpose ; this
should be a key-entry in the current set of jpicedt/lang/i18n_xx.properties
resource files, with the corresponding value being a properly localized message.public REParserException(String message, Context context, AbstractRegularExpression expr)
context
- the Context used by the parser raising this exception ; merely serves as a document locator.Method Detail |
---|
public String getMessage()
getMessage
in class ParserException
public String toString()
toString
in class Throwable
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |