GLOSS: error messages and exceptions

As with any computer language, errors occur (usually human ones) and you can expect to get error messages at times.

The error messages from GLOSS's java core program take the form

gloss.GlossException: <message>

As part of the message, you can usually hope to see a line number in the input file indicating where the error originated from, and possibly also the token itself that had just been read. This page lists (most) of the errors and tries to give some sort of more human way of interpreting them. (It is quite possible that the list here is slightly out-of date. If so, I apologise. Comments welcome.)

adding incompatible data to node
GLOSS was asked to do something that violates the xml DOM standards, such as to insert two root nodes or to make a text node have a child.
Attempt to label EOS
If you are using LABEL tokens, the label must precede the object you are labelling and it is not allowed to attempt to label the end-of-stream marker at the end of a file.
cannot export parameter
Error when mv:export-parameter command was executed. The parent mode cannot receive a parameter, perhaps because this parent is the top-level starting mode that starts mode main. (It is not allowed to change global parameters of GLOSS in this way.)
cannot find/get root element at "doctype" node
An error caused by GLOSS's printer subsystem. This shouldn't occur.
can't un-get Token
Rare. The Tokenizer was asked to back-track further than it is able to do.
command or node type not supported
Some XML data in the MV file was read that GLOSS couldn't recognize as a valid command. Since GLOSS tries hard to do something for all nodes, this is an highly unusual error.
EOS expected near line <line>
GLOSS had finished reading its input and constructing the dataset, but there appears to be extraneous input text not used. Possibly one or more {, }, [, ] characters are missing from somewhere else, or there are indentation problems.
illegal expression: <pattern>
GLOSS failed to interpolate parameter values in the pattern given, most likely because of mis-matched braces, { and }.
illegal prefix: <prefix>
A prefix (declared in mv:declare-prefix) must be a syntactically correct identifier, formed from the characters ., _, -, a-z, A-Z, 0-9 for example.
illegal namespace for attribute <name>
Rare. XML rules dictate that there is no default namespace for attributes. Attributes without prefixes are not in any namespace.
Illegal null key-name found
An error caused by GLOSS's parameters subsystem. This shouldn't occur.
Illegal null parameter value found
An error caused by GLOSS's parameters subsystem. This shouldn't occur.
illegal prefix for element/attribute <name>
An error detected by GLOSS's printer subsystem. An attempt was made to write an element or attribute with an illegal XMLNS prefix.
illegal syntax in mode <modeName>
A mv:mode element may only contain mv:include, mv:default and mv:match children.
Illegal token
A token of the type allowed in the accept value of a mode was read, but it did not match any of the mode's mv:match children. This is usually a syntax error of the text input file. (Information is given as to which token caused it.) However, consider adding more mv:match's or a mv:default to the mode if possible.
include element with no target mode in <modeNname>
The mode attribute is mandatory for mv:include elements.
Internal error: no more data
Tokenizer error. This shouldn't happen.
match element with no type in mode <modeName>
The type attribute is mandatory for mv:match elements.
missing "name" attribute in "entity-reference"/"character-reference"
An error detected by GLOSS's printer subsystem. This should be rare. The xr:entity-reference and xr:character-reference elements require a manditory name attribute.
missing "name" attribute in "element"
An error detected by GLOSS's printer subsystem. This should be rare. The xr:element element requires a manditory name attribute.
missing name in set-parameter/init-parameter node
The name attribute to set-parameter and init-parameter is manditory.
missing "name" attribute in "attribute"
An error detected by GLOSS's printer subsystem. This should be rare. The xr:attribute element requires a manditory name attribute.
missing "target" attribute in "processing-instruction"
An error detected by GLOSS's printer subsystem. This should be rare. The xr:processing-instruction element requires a manditory target attribute.
missing value in <childName> node
The value attribute to set-parameter and init-parameter is manditory.
no previous node found for infix operation
The mv:infix operation expects a previous element to have been already placed on the output XML dataset as a sibling.
Something's wrong (repeated token found)
GLOSS detected some circularity in its execution which would otherwise have caused it to hang. This might be caused by a mode calling another mode which mv:aborts allowing the first mode to re-read the same token, etc. But most likely, this error indicates that one or more {, }, [, ] characters are missing in the input text, such as a close brace } that should match a previous { is missing. Similarly this error could be cause by an indentation problem.
something's wrong - we seem to be stuck, at line=<line>, col=<col>
Rare. The Tokenizer has detected a looping condition that might make GLOSS hang. You probably did something rather silly at the indicated line, or in the MV you are writing..
syntax error in match: <tokVal> against <matchStr>
A syntax error was detected in an extended match (one starting with $) probably because some sequence of characters that are supposed to represent a number couldn't be parsed correctly.
undeclared prefix: <prefix> found in expression <pattern> when using prefixes <prefixes>
GLOSS attempted to interpolate a pattern starting with "PREFIX:" but did not understand the prefix PREFIX. (A list of prefixes it does know is given.) Often this is caused by using text such as "http://www.myurl.com", and the http: prefix is unknown. The solution is to use "'http://www.myurl.com'" or "http$://www.myurl.com" instead. This can be a tricky error to pin down, since the line number and context of the offending text has long been forgotten. (The offending text is printed as "pattern" by GLOSS.) Please remember that such offending text can only occur in MV or mode files and never in input text files.
unexpected node type
GLOSS's printer subsystem was given a node it didn't recognize.
unknown <xrURI> element name: <name>
GLOSS's printer subsystem was given a command it didn't recognize.

This page is copyright. Web page design and creation by GLOSS.