(class)
public SyntaxError
{inherits
Error}
The class of Exceptions that are thrown when syntax errors occur.
| constructor
public
| {SyntaxError.default problem:String, url:#Url, line:int, column:int } |
| with-location: | Construct error taking location info from single variable |
| column: | The column number in line. |
accessor public final SyntaxError.column:
int
field public constant SyntaxError.error-name:#
String
| line: | The line number in url. |
accessor public final SyntaxError.line:
int
accessor public final SyntaxError.problem:
String
| url: | The file which caused the error, if known. |
accessor public final SyntaxError.url:#
Url
| where: | Location in source of error, if known. |
| object-describe: | Describes an object in a way that is suitable for printing by the user. |
(constructor)
| public
| {SyntaxError.default problem:String, url:#Url, line:int, column:int } |
Construct a SyntaxError.
problem: A human readable message, to which the location information is prepended to produce
Exception.message.
url: The
Url of the resource that the error occurred in. This may be
null if this information is unavailable. The
Url represents Curl Language source code or some
Url relevant to where the error occurred.
line: Line number in url where the error occurred.
column: Column number in line where the error occurred.
(constructor)
Construct error taking location info from single variable
where: specifies the source location of the error. This will be saved in the corresponding
where field, and will be used to compute the values of
url,
line and
column.
problem: is a human readable string describing the error, which may be translated into the host language.
error-name: is a string containing a code name for the error intended to uniquely identify the type of error.
Description
Like
SyntaxError.default constructor except that it takes the url, line and column from the
location variable using its
BaseSourceLocation.get-url-line-column method. The computation of the url, line and column is deferred until it is needed, that is, until one of those getters is accessed or the error is printed.
Introduced in:
version 6.0
(accessor)
accessor public final SyntaxError.column:
int The column number in line.
Notes
If url is null, there is no location information.
(field)
public constant SyntaxError.error-name:#
String String containing an error code.
Description
This is only set by the
with-location constructor, and otherwise will be null.
If non-null, this will contain a string that identifies the type of error.
Introduced in:
version 6.0
(accessor)
This item is unsupported and reserved for internal use.
Introduced in:
version 6.0
(accessor)
accessor public final SyntaxError.line:
int The line number in url.
Notes
If url is null, there is no location information.
(accessor)
accessor public final SyntaxError.problem:
String A human readable message.
Description
(accessor)
accessor public final SyntaxError.url:#
Url The file which caused the error, if known.
Notes
If url is null, there is no location information.
(field)
Location in source of error, if known.
Description
This field contains the location of the error in the source code represented as a
BaseSourceLocation object. This will only be non-null if the error was initialized using the
with-location constructor. If non-null, it will be used to compute the
url,
line and
column attributes.
Introduced in:
version 6.0
(method)
Describes an object in a way that is suitable for printing by the user.
out: The stream to which the characters are sent.
locale: The
Locale that controls how
self is displayed.
Description
This method is generally invoked indirectly using the
"%s" format key.
simply calls
{obj.object-describe out}.
For example, if
u is a
Url,
{u.object-describe os}
writes
u's name to
os.
The default implementation of this method has the effect of calling
{format
out = out, locale = locale,
"%v", obj
}
(see
format for details about the "%v" format key).