Up Next

C.1 Event Types

C.1.1 Argument Types and Values

EventEvent TypeDefault Event Handler

C.1.2 Arithmetic, Environment

EventEvent TypeDefault Event Handler

C.1.3 Data and Memory Areas, Predicates, Operators

EventEvent TypeDefault Event Handler

C.1.4 Modules, Visibility

EventEvent TypeDefault Event Handler


C.1.5 Syntax Errors, Parsing

EventEvent TypeDefault Event Handler

C.1.6 Compilation, Run-Time System, Execution

EventEvent TypeDefault Event Handler


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


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


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

C.1.10 Debugging, Object Files

EventEvent TypeDefault Event Handler


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


The handlers for these events receive the following arguments:

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

Up Next