Up Next

C.1  Event Types

C.1.1  Argument Types and Values

EventEvent TypeDefault Event Handler

1

general errorerror_handler / 2
2term of an unknown typeerror_handler / 2
4instantiation faulterror_handler / 4
5type errorerror_handler / 4
6out of rangeerror_handler / 4
7string contains unexpected characterserror_handler / 2
8bad argument listerror_handler / 2

C.1.2  Arithmetic, Environment

EventEvent TypeDefault Event Handler

15

creating parallel choice pointfail / 0
16failing to parallel choice pointfail / 0
17recomputation failederror_handler / 2
20arithmetic exceptionerror_handler / 2
21undefined arithmetic expressionerror_handler / 4
23comparison trapcompare_handler / 4
24number expectederror_handler / 2
25integer overflowinteger_overflow_handler / 2
30trying to write a read-only flagerror_handler / 2
31arity limit exceedederror_handler / 2
32no handler for eventwarning_handler / 2
33event queue overflowerror_handler / 2

C.1.3  Data and Memory Areas, Predicates, Operators

EventEvent TypeDefault Event Handler

40

stale object handleerror_handler / 2
41array or global variable does not existundef_array_handler / 3
42redefining an existing arraymake_array_handler / 4
43multiple definition postfix/infixerror_handler / 2
44record already existserror_handler / 2
45record does not existundef_record_handler / 2
50trying to modify a read-only ground termerror_handler / 2
60referring to an undefined procedureerror_handler / 4
61inconsistent tool redefinitionerror_handler / 4
62inconsistent procedure redefinitionerror_handler / 4
63procedure not dynamicerror_handler / 4
64procedure already dynamicdynamic_handler / 3
65procedure already definederror_handler / 4
66trying to modify a system predicateerror_handler / 4
67procedure is not yet loadederror_handler / 4
68calling an undefined procedurecall_handler / 4
69autoload eventautoload_handler / 4
70accessing an undefined dynamic procedureundef_dynamic_handler / 3
71procedure already parallelerror_handler / 2
72accessing an undefined operatorerror_handler / 2
73redefining an existing operatortrue / 0
74hiding an existing global operatortrue / 0
75referring to a deprecated predicatedeclaration_warning_handler / 3
76predicate declared but not defineddeclaration_warning_handler / 3
77predicate used but not declared or defineddeclaration_warning_handler / 3
78calling a procedure with a reserved nameerror_handler / 2

C.1.4  Modules, Visibility

EventEvent TypeDefault Event Handler

80

not a moduleerror_handler / 2
81module/1 can appear only as a directiveerror_handler / 2
82trying to access a locked modulelocked_access_handler / 2
83creating a new modulewarning_handler / 2
84referring to non-exported predicatedeclaration_warning_handler / 3
85referring to non-existing moduledeclaration_warning_handler / 3
86lookup module does not existno_lookup_module_handler / 4
87attempt to redefine an existing local itemwarning_handler / 3
88attempt to redefine an existing exported itemwarning_handler / 3
89attempt to redefine an already imported itemwarning_handler / 3
90procedure is already reexportederror_handler / 4
91not a tool procedureerror_handler / 2
92trying to redefine an existing local procedureerror_handler / 4
93trying to redefine an existing exported procedureerror_handler / 4
94trying to redefine an existing imported procedureerror_handler / 4
96ambiguous importambiguous_import_resolve / 3
97module already existserror_handler / 2
98key not correcterror_handler / 2
99unresolved ambiguous importambiguous_import_warn / 3
100accessing a procedure defined in another moduleundef_dynamic_handler / 3
101trying to erase a module from itselferror_handler / 2


C.1.5  Syntax Errors, Parsing

EventEvent TypeDefault Event Handler

110

syntax error:parser_error_handler / 2
111syntax error: list tail ended improperlyparser_error_handler / 2
112syntax error: illegal character in a quoted tokenparser_error_handler / 2
113syntax error: unexpected commaparser_error_handler / 2
114syntax error: unexpected tokenparser_error_handler / 2
115syntax error: unexpected end of fileparser_error_handler / 2
116syntax error: numeric constant out of rangeparser_error_handler / 2
117syntax error: bracket necessaryparser_error_handler / 2
118syntax error: unexpected fullstopparser_error_handler / 2
119syntax error: postfix/infix operator expectedparser_error_handler / 2
120syntax error: wrong solo charparser_error_handler / 2
121syntax error: space between functor and open bracketparser_error_handler / 2
122syntax error: variable with multiple attributesparser_error_handler / 2
123illegal iteration specifier in do-looperror_handler / 4
124syntax error : prefix operator followed by infix operatorparser_error_handler / 2
125syntax error : unexpected closing bracketparser_error_handler / 2
126syntax error : grammar rule head is not validparser_error_handler / 2
127syntax error : grammar rule body is not validparser_error_handler / 2
128syntax error : in source transformationparser_error_handler / 2
129syntax error: source transformation flounderedparser_error_handler / 2

C.1.6  Compilation, Run-Time System, Execution

EventEvent TypeDefault Event Handler

130

syntax error: illegal headcompiler_error_handler / 2
131syntax error: illegal goalcompiler_error_handler / 2
132syntax error: term of an unknown typecompiler_error_handler / 2
133loading the librarytrue / 0
134procedure clauses are not consecutivecompiler_error_handler / 2
135trying to redefine a protected procedurecompiler_error_handler / 2
136trying to redefine a built-in predicatecompiler_error_handler / 2
137trying to redefine a procedure with another typecompiler_error_handler / 2
138singleton local variable in do-loopsingleton_in_loop / 2
139compiled or dumped file messagecompiled_file_handler / 3
140undefined instructionerror_handler / 2
141unimplemented functionalityerror_handler / 2
142built-in predicate not available on this systemerror_handler / 2
143compiled query failedcompiler_error_handler / 2
144a cut is not allowed in a conditioncompiler_error_handler / 2
145procedure being redefined in another fileredef_other_file_handler / 2
146start of compilationtrue / 0
147compilation abortedcompiler_abort_handler / 3
148bad pragmapragma_handler / 3
149code unit loadedunit_loaded_handler / 3


The handlers for these events receive the following arguments:

EventSecond ArgumentThird Argument
130Culprit clauseModule
131Culprit clauseModule
132Culprit clauseModule
133Library name (string)undefined
134Procedure Name/ArityModule
135Procedure Name/ArityModule
136Procedure Name/ArityModule
137Procedure Name/ArityModule
138Variable name (atom)undefined
139(File, Size, Time), see belowModule
140’Emulate’undefined
141GoalModule
142GoalModule
143GoalModule
144Goal (if an execution error) or Culprit clause (if compiler error) Module
145(Name/Arity, OldFile, NewFile)Module
146FileModule
147File
148ClauseModule

The second argument for the event 139 depends on the predicate where it was raised:

C.1.7  Top-Level

EventEvent TypeDefault Event Handler

150

start of eclipse executionsepia_start / 0
151eclipse restarttrue / 0
152end of eclipse executionsepia_end / 0
153toplevel: print prompttoplevel_prompt / 2
154toplevel: start of query executiontrue / 0
155toplevel: print valuesprint_values / 3
156toplevel: print answertty_ask_more / 2
157error exiterror_exit / 0
158toplevel: entering break levelstart_break / 3
159toplevel: leaving break levelend_break / 3


These events are not errors but rather hooks to allow users to modify the behaviour of the ECLiPSe toplevel. Therefore the arguments that are passed to the handler are not the erroneous goal and the context module but defined as follows:

EventSecond ArgumentThird Argument
150A free variable. If the handler binds the variable to an atom, this name is used as the toplevel module nameundefined
151undefinedundefined
152The argument is the number that ECLiPSe will return to the operating systemundefined
153current toplevel modulecurrent toplevel module
154a structure of the form
goal(GoalVarListNewGoalNewVarList),
where Goal is the goal that is about to be executed and VarList is the list that associates the variables in Goal with their names (like in readvar/3). NewGoal and NewVarList are free variables. If the handler binds NewVarList then the toplevel will use NewGoal and NewVarList to replace Goal and VarList in the current query.
current toplevel module
EventSecond ArgumentThird Argument
155A list associating the variable names with their values after the query has been executed.current toplevel module
156An atom stating the answer to the query that was just executed. The possible values are: yes, last_yes or no if the query had no variables, more_answers, last_answer if the query contained variables and bindings were printed, no_answer if a query containing variables failed.current toplevel module
157undefinedundefined
158break levelcurrent toplevel module
159break levelcurrent toplevel module


When the handler for event 152 (“end of eclipse execution”) calls throw/1, ECLiPSe is not exited. This is a way to prevent accidental exits from the system. Failure of the handler is ignored.

C.1.8  Macro Transformation Errors, Lexical Analyser

EventEvent TypeDefault Event Handler

160

global macro transformation already existserror_handler / 4
161macro transformation already defined in this modulemacro_handler / 3
162no macro transformation defined in this modulewarning_handler / 2
163illegal attempt to remove the last member of a character classerror_handler / 2
164toplevel: print bannertty_banner / 2
165can’t compile an attributed variable (use add_attribute/2,3)error_handler / 2
166file successfully processedrecord_compiled_file_handler / 3
167initialization/finalization goal failed or abortedwarning_handler / 3


The event 164 is raised whenever the toplevel loop is restarted.

EventSecond ArgumentThird Argument
164the banner string

C.1.9  I/O, Operating System, External Interface

EventEvent TypeDefault Event Handler

170

system interface errorsystem_error_handler / 4
171File does not exist :error_handler / 2
172File is not open :error_handler / 2
173library not founderror_handler / 2
174child process terminated due to signalerror_handler / 2
175child process stoppederror_handler / 2
176message passing errorerror_handler / 2
177shared library not founderror_handler / 2
190end of file reachedeof_handler / 4
191output erroroutput_error_handler / 4
192illegal stream modeerror_handler / 2
193illegal stream specificationerror_handler / 2
194too many symbolic names of a streamerror_handler / 2
195yield on flushio_yield_handler / 2
196trying to modify a system streamclose_handler / 2
197use ’input’ or ’output’ instead of ’user’error_handler / 2
198reading past the file endpast_eof_handler / 2
210Remember() not inside a backtracking predicateerror_handler / 2
211External function does not existerror_handler / 2
212External function returned invalid codeerror_handler / 2
213Error in external functionerror_handler / 2
214Licensing problemerror_handler / 2

C.1.10  Debugging, Object Files

EventEvent TypeDefault Event Handler

230

uncaught exceptionerror_handler / 2
231default help/0 messagefail / 0
249debugger new suspensions eventbip_delay / 0
250debugger init eventtrace_start_handler_tty / 0
251debugger builtin fail eventbip_port / 4
252debugger port eventtrace_line_handler_tty / 2
253debugger call eventncall / 2
254debugger exit eventnexit / 1
255debugger redo eventredo / 5
256debugger delay eventndelay / 2
257debugger wake eventresume / 2
258debugger builtin call eventbip_port / 4
259debugger builtin exit eventbip_port / 4
260unexpected end of fileerror_handler / 2
261invalid saved stateerror_handler / 2
262can not allocate required spaceerror_handler / 2
263can not save or restore from another break level than level 0error_handler / 2
264not an eclipse object filecompiled_file_handler / 3
265bad eclipse object file versioncompiled_file_handler / 3
267predicate not implemented in this versionerror_handler / 2
268predicate not supported in parallel sessionerror_handler / 2


These handlers receive special arguments:

EventSecond ArgumentThird Argument
252trace_line{port:Port,frame:Frame}undefined
264(File, [], [])undefined
265(File, [], [])undefined

C.1.11  Extensions

EventEvent TypeDefault Event Handler

270

undefined variable attributeerror_handler / 2
271bad format of the variable attributeerror_handler / 2
272delay clause may cause indefinite delaywarning_handler / 2
273delayed goals leftdelayed_goals_handler / 3
274stack of woken lists emptyerror_handler / 2
280Found a solution with costcost_handler / 2


The handlers for these events receive the following arguments:

EventSecond ArgumentThird Argument
272Culprit clauseModule
273list of sleeping suspensionsundefined
280Cost, Goalundefined

Up Next