C.1 Event Types
- Argument Types and Values
- Arithmetic, Environment
- Data and Memory Areas, Predicates, Operators
- Modules, Visibility
- Syntax Errors, Parsing
- Compilation, Run-Time System, Execution
- Top-Level
- Macro Transformation Errors, Lexical Analyser
- I/O, Operating System, External Interface
- Debugging, Object Files
- Extensions
C.1.1 Argument Types and Values
Event | Event Type | Default Event Handler |
C.1.2 Arithmetic, Environment
Event | Event Type | Default Event Handler |
C.1.3 Data and Memory Areas, Predicates, Operators
Event | Event Type | Default Event Handler |
C.1.4 Modules, Visibility
Event | Event Type | Default Event Handler |
C.1.5 Syntax Errors, Parsing
Event | Event Type | Default Event Handler |
C.1.6 Compilation, Run-Time System, Execution
Event | Event Type | Default Event Handler |
The handlers for these events receive the following arguments:
Event | Second Argument | Third Argument |
|
130 | Culprit clause | Module |
131 | Culprit clause | Module |
132 | Culprit clause | Module |
133 | Library name (string) | undefined |
134 | Procedure Name/Arity | Module |
135 | Procedure Name/Arity | Module |
136 | Procedure Name/Arity | Module |
137 | Procedure Name/Arity | Module |
138 | Variable name (atom) | undefined |
139 | (File, Size, Time), see below | Module |
140 | ’Emulate’ | undefined |
141 | Goal | Module |
142 | Goal | Module |
143 | Goal | Module |
144 | Goal (if an execution error) or Culprit clause (if compiler error) | Module |
145 | (Name/Arity, OldFile, NewFile) | Module |
146 | File | Module |
147 | File |
148 | Clause | Module |
|
The second argument for the event 139 depends on the predicate
where it was raised:
- compile/1,2
- (file name, code size, compile time)
- compile_stream/1 -
(’string’, code size, compile time) with a string stream
- compile_stream/1 -
(file name, code size, compile time) with a stream associated to a file
C.1.7 Top-Level
Event | Event Type | Default 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:
Event | Second Argument | Third Argument |
|
150 | A free variable. If the handler binds the variable
to an atom, this name is used as the toplevel module name | undefined |
151 | undefined | undefined |
152 | The argument is the number that ECLiPSe will return to the
operating system | undefined |
153 | current toplevel module | current toplevel module |
154 | a structure of the form
goal(Goal, VarList, NewGoal, NewVarList),
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 |
|
Event | Second Argument | Third Argument |
|
155 | A list associating the variable names with their values after the
query has been executed. | current toplevel module |
156 | An 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 |
157 | undefined | undefined |
158 | break level | current toplevel module |
159 | break level | current 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
Event | Event Type | Default Event Handler |
The event 164 is raised whenever the toplevel loop is restarted.
Event | Second Argument | Third Argument |
|
164 | the banner string |
|
C.1.9 I/O, Operating System, External Interface
Event | Event Type | Default Event Handler |
C.1.10 Debugging, Object Files
Event | Event Type | Default Event Handler |
These handlers receive special arguments:
Event | Second Argument | Third Argument |
|
252 | trace_line{port:Port,frame:Frame} | undefined |
264 | (File, [], []) | undefined |
265 | (File, [], []) | undefined |
|
C.1.11 Extensions
Event | Event Type | Default Event Handler |
The handlers for these events receive the following arguments:
Event | Second Argument | Third Argument |
|
272 | Culprit clause | Module |
273 | list of sleeping suspensions | undefined |
280 | Cost, Goal | undefined |
|