Next: ref-ere-err-cns, Previous: ref-ere-err-per, Up: ref-ere-err [Contents][Index]
A context error occurs when a goal or declaration appears in the wrong
place. There may or may not be anything wrong with the goal or
declaration as such; the point is that it is out of place. Calling
multifile/1
as a goal is a context error, as is having
:-module/2
anywhere but as the first term in a source file. This
error classe is an extension to the ISO Prolog standard.
The SICStus_Error term associated with a context error is
context_error(Goal, ContextType, CommandType)
the context in which the command was attempted.
the type of command that was attempted.