Package gnu.text
Class SourceError
java.lang.Object
gnu.text.SourceLocator.Simple
gnu.text.SourceError
- All Implemented Interfaces:
SourceLocator,SourceLocator,Locator
Represents an error message from processing a "source" file.
-
Nested Class Summary
Nested classes/interfaces inherited from interface gnu.text.SourceLocator
SourceLocator.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionIf non-null, an error code, as might be specified by a standard.Provides optional stack trace.The actual error message.Used to chain to the "next" message.charThe seriousness of the error - one of 'i' (for informational), 'w' (for warning), 'e' (for error), or 'f' (for fatal error).Fields inherited from class gnu.text.SourceLocator.Simple
filename, position -
Constructor Summary
ConstructorsConstructorDescriptionSourceError(char severity, SourceLocator location, String message) SourceError(char severity, String filename, int line, int column, String message) SourceError(gnu.kawa.io.InPort port, char severity, String message) Create a new SourceError using the current line/column from aInPort. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendEscaped(Appendable out, CharSequence str) voidappendTo(Appendable out, boolean stripDirectories, String newLine) voidprint(Appendable out) voidprintln(Appendable out, boolean stripDirectories) toString()Convert the error to a String.toString(boolean stripDirectories) Convert the error to a String.Methods inherited from class gnu.text.SourceLocator.Simple
getColumnNumber, getEndColumn, getEndLine, getFileName, getLineNumber, getPublicId, getStartColumn, getStartLine, getSystemId, isRepl, isStableSourceLocation, setFile, setLine, setLine, setLine, setLocation
-
Field Details
-
next
Used to chain to the "next" message. -
severity
public char severityThe seriousness of the error - one of 'i' (for informational), 'w' (for warning), 'e' (for error), or 'f' (for fatal error). -
code
If non-null, an error code, as might be specified by a standard. -
message
The actual error message. This is post-localization and -formatting. It can contain multiple lines, separated by '\n'. -
fakeException
Provides optional stack trace. Filled when --debug-error-prints-stack-trace or --debug-warning-prints-stack-trace option is used.
-
-
Constructor Details
-
SourceError
-
SourceError
-
SourceError
Create a new SourceError using the current line/column from aInPort.
-
-
Method Details
-
toString
Convert the error to a String. The String starts with filename, line and option column, followed by the message. Warning messages are indicated as such. -
toString
Convert the error to a String. The String starts with filename, line and option column, followed by the message. Warning messages are indicated as such. -
appendEscaped
- Throws:
IOException
-
appendTo
-
print
-
println
-