|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.main.tex.ErrorHandlerImpl
public class ErrorHandlerImpl
This is a simple implementation of the error handler interacting with the
user on the command line like
The HelpingException is capable of carrying a name
and two arguments for the error message. This class can be queried to provide
additional help concerning the error at hand. See
HelpingException for details.
| Field Summary | |
|---|---|
protected static java.lang.String |
NL
The constant NL contains the String with the newline character, since it is needed several times. |
| Constructor Summary | |
|---|---|
ErrorHandlerImpl()
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
enableLogging(java.util.logging.Logger theLogger)
Setter for the logger. |
protected void |
handleDebug()
Special treatment of the debug case. |
boolean |
handleError(GeneralException exception,
Token t,
TokenSource source,
Context context)
This is the error handling callback. |
protected java.lang.String |
promptAndReadLine(java.lang.String prompt)
Read a line of characters from the standard input stream after a prompt has been shown. |
void |
setEditHandler(EditHandler editHandler)
Setter for the edit handler. |
protected void |
showErrorLine(java.util.logging.Logger logger,
java.lang.String message,
Locator locator)
This method is invoked to present the current line causing the error. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String NL
| Constructor Detail |
|---|
public ErrorHandlerImpl()
| Method Detail |
|---|
public void enableLogging(java.util.logging.Logger theLogger)
enableLogging in interface LogEnabledtheLogger - the logger to useLogEnabled.enableLogging(
java.util.logging.Logger)
protected void handleDebug()
throws HelpingException
HelpingException - in case of EOF on terminal
public boolean handleError(GeneralException exception,
Token t,
TokenSource source,
Context context)
throws HelpingException
handleError in interface ErrorHandlerexception - the exception which has led to the invocationt - the token leading to the errorsource - the token sourcecontext - the processor context
true iff the processing can continue
HelpingException - in case of en errorErrorHandler.handleError(org.extex.core.exception.GeneralException,
org.extex.scanner.type.token.Token,
org.extex.interpreter.TokenSource,
org.extex.interpreter.context.Context)
protected java.lang.String promptAndReadLine(java.lang.String prompt)
throws HelpingException
prompt - the prompt to display
null to signal EOF
HelpingException - in case of EOF on terminalpublic void setEditHandler(EditHandler editHandler)
setEditHandler in interface ErrorHandlereditHandler - the new edit handlerErrorHandler.setEditHandler(
org.extex.interpreter.EditHandler)
protected void showErrorLine(java.util.logging.Logger logger,
java.lang.String message,
Locator locator)
logger - the logger to use for outputmessage - the error messagelocator - the locator for the error position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||