VRP Error Messages


RDFSuite      Download VRP      Instructions      Documentation      Users     


For a parser the error reporting is one of the main features. Therefore VRP provides a huge list of differentiated error messages refined with additional information. The system provides for each error an unique error number. These error numbers start with the number of the type the error belongs to followed by a running number for each type. There are five error types provided by the system:
  1. Lexical error errors called by the lexical analyzer, if the input does not match the specifications.
  2. Syntax error errors against the BNF of RDF, called by the syntax analyzer.
  3. Semantic/Syntax error errors against the syntax, called by the action part of the syntax analyzer.
  4. Semantic error errors against the RDF Schema, called during creation of the model and validating it.
  5. System error system errors like read-write or connection errors.
It exists an extra Java class (RDF_Error) to handle errors. The method to emit an error is called emit_error. The method needs four parameters:
  1. The number of the type the error belongs to.
  2. The number of the error message.
  3. Additional information like parameters of the method the error is called of in from of a string.
  4. The Java class name and the name of the method the error appeared, separated by a dot.
For example the following line would emit the error number 25 of the type 3 (Semantic error), called by the method RDF_Property_test of the Java class Model.

e.emit_error(3, 25, str, "Model.RDF_Propterty_test");

It could cause the following error report:

Semantic error

3025: The element is not declared in the RDF-Schema namespace.

http://www.w3.org/2000/01/rdf-schema##test

Error called by: Model.RDF_Property_test

at line 16(2) of input during parsing: </

First comes the type in a textual form, followed by the number and corresponding error message. The next line shows the additional information. Then comes the name of the method the error appeared. In the last line of the error report we can see a hint where to search for the error inside the input file. Because of the bottom up parsing this is not the exact position of the error but points to the position in the file where the element that contains the error is reduced by the parser. This information can only be provided for errors detected during parsing.

The full list of error messages sorted by error types (0-4):
 

Lexical error (type 0)

There is no error recovery supported for the lexical analyzer. There is no error recovery supported for the lexical analyzer. If an lexical error appears and the system would not be stopped we would get in the most cases a huge list of errors caused by the first error. This is not very useful and therefore I decided to exit the system after an lexical error appears. For these errors there will be an error position report.
 
0000
A valid XML, RDF or HTML statement expected.
0001
A qualified name expected ([NSprefix:]QName). See http://www.w3.org/TR/1999/REC-xml-names-19990114/ for more info about QName. 
0002
A qualified name expected ([NSprefix:]QName). See http://www.w3.org/TR/1999/REC-xml-names-19990114/ for more info about QName.
0003
A valid XML Attribute expected.
0004
A valid RDF element expected.
0005
A qualified name expected. See http://www.w3.org/TR/1999/REC-xml-names-19990114/ for more info about QName.
0006
A qualified name expected ([NSprefix:]QName). See http://www.w3.org/TR/1999/REC-xml-names-19990114/ for more info.
0007
A valid XML/RDF Attribute expected.
0008
A qualified name in quotas expected (=\"QName\"). See http://www.w3.org/TR/1999/REC-xml-names-19990114/ for more info about QName.

Syntax error (type 1)

Syntax errors are detected during parsing by mismatching the given grammar. Therefore CUP provides an error token. If an incoming token does not fit to the grammar and an error token is specified in the procedure an syntax error will be reported and the system will try to recover the error. Only if this error recovery fails the system will be stopped. It is possible that previous errors affect later once. For these errors there will be an error position report.
 
1001
See RDF M&S [6.1].
1002
Error in a description, compare with [6.3] RDF M&S.
1003
Error in an attributelist.
1004
Error in a propertyele [6.12] RDF M&S.
1005
Error in a sequence, see [6.25] of RDF M&S.
1006
Error in a bag, see [6.26] of RDF M&S.
1007
Error in an alternative, see [6.27] of RDF M&S.
1008
Error in a member, see [6.28]-[6.30] of RDF M&S.
1009
This is not a well-formed XML [6.34] RDF M&S.

Semantic/Syntax error (type 2)

These errors will not stop the parsing and they are not affecting each other. There will be an error position report.
 
2001
You are not allowed to enter other attributes than ID-attr at this position.
2002
ID should be unique.
2003
Attribute used twice in a attribute list.
2004
Only one of the attributes rdf:ID, rdf:nodeID or rdf:about are allowed in an attr_list.
2006
You need to specify an alternative
2007
You can not define the same prefix more than one time.
2008
The prefix of the tag name is not declared.
2009
The start tag does not match end tag.
2010
You are only allowed to enter one of rdf:ID, rdf:nodeID or rdf:resource within one propertyEle.
2011
The attributes rdf:aboutEach and rdf:aboutEachPrefix have been removed by the RDF WG. The corresponding typedNode therefore will be ignored.
2012
Not a valid URI
2013
The rdf and XML namespace URL is not allowed as a prefix for other namespaces.

Semantic error (type 3)

These errors will not stop the parsing and they are not affecting each other. There may be an error position report.
 
3001
You are not allowed to change a rdfs:Class to a rdf:Property.
3002
You are not allowed to change a rdfs:Class to a rdf:Statement.
3003
You are not allowed to change a rdfs:Class to a rdf:Container.
3004
You are not allowed to change a rdf:Property to a rdfs:Class.
3005
You are not allowed to change a rdf:Property to a rdf:Statement.
3006
You are not allowed to change a rdf:Property to a rdf:Container.
3007
You are not allowed to change a rdf:Statement to a rdfs:Class.
3008
You are not allowed to change a rdf:Statement to a rdf:Property.
3009
You are not allowed to change a rdf:Statement to a rdf:Container.
3010
You are not allowed to change a rdf:Container to a rdfs:Class.
3011
You are not allowed to change a rdf:Container to a rdf:Property.
3012
You are not allowed to change a rdf:Container to a rdf:Statement.
3013
The rdfs:subPropertyOf is not allowed to use with a class as subject.
3014
The rdfs:subPropertyOf is not allowed to use with a property as object.
3015
The rdfs:range property is not allowed to use with a class as subject.
3016
The rdfs:range property is not allowed to use with a property as object.
3017
The rdfs:domain property is not allowed to use with a class as subject.
3018
The rdfs:domain property is not allowed to use with a property as object.
3019
The object for this triple must be a Literal.
3020
This properties are not allowed to use with a Literal as object.
3021
The object for the property rdf:type can not be a property.
3022
The rdf:type property is not allowed to be used with a Literal as object.
3023
The property of the statement had not been inserted in the model as a property.
3024
Type mismatch, it is not allowed to mix the types; Class, Property and Statement.
3025
The element is not declared in the RDF-Schema namespace.
3026
The element is not declared in the RDF namespace.
3027
The element is not declared in the corresponding namespace.
3028
The Container you are asking for is not a Container.
3029
Loop detected!!
3030
There is only one range declaration per rdf:Property allowed.
3031
There is only one subject declaration per rdf:Statement allowed.
3032
There is only one predicate declaration per rdf:Statement allowed.
3033
There is only one object declaration per rdf:Statement allowed.
3034
There need to be for each rdf:Statement exactly one predicate, subject and object.
3035
Where not able to find the type:Statement for this rdf:Statement.
3036
Where not able to find the type:Class for this rdfs:Class.
3037
Where not able to find the type:Property for this rdf:Property.
3038
Where not able to find one of the types:Bag, Seq or Alt for this rdf:Container.
3039
The range definition of the sub property does not fit to the range definition of the super class.
3040
The domain definition of the sub property does not fit to the domain definition of the super class.
3041
Error in range check.
3042
Error in domain check.
3043
The namespace does not contain the element you requested.
3044
Type error.
30100
For container members the rdf:_nnn property is only allowed for nnn being integers greater 0 with no leading 0.

System error (type 4)

System errors are fatal errors and will cause in the most cases an exit of the system. There is no error position report for these errors.
 
4001
Output file does not exists.
4002
Can't read output file.
4003
Can't write to output file.
4004
Error in creation or connection with the output file.
4005
Could not go on parsing or validate.
4006
Could not connect to file.
4007
Invalid option. Valid options are; d, f, g, o, s, t and v.
4008
To many arguments! Run program with no arguments to get the usage-text.
4009
Expected '-' at the beginning of the options.