Next: , Previous: , Up: ref-ere-err   [Contents][Index]


4.15.4.9 Context Errors

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 class is an extension to the ISO Prolog standard.

The SICStus_Error term associated with a context error is

context_error(Goal, ContextType, CommandType)
ContextType

the context in which the command was attempted.

CommandType

the type of command that was attempted.


Send feedback on this subject.