[ ECLiPSe Event built-in.|Group Index| Full Index]

get_error_handler(+Number, ?PredSpec, ?Module)

Returns the error_handler for error number Number and its home module Module.

+Number
Integer.
?PredSpec
Term which unifies with atom/integer.
?Module
Atom or variable.

Description

Given the error number Number, PredSpec is unified with the specifiation (i.e. a term of the form name/arity) of the current handler for error with number Number; Module is unified with its home module.

The errors which exist are implementation defined.

Fail Conditions

Fails if PredSpec or Module do not unify with the specification of the current error handler with number Number.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Number is not instantiated.
(5) Type error
Number is not an integer.
(5) Type error
PredSpec is neither a variable nor of the form Atom/Integer.
(6) Range error
Number is not a valid error number.

Examples


Success:
   [eclipse]: string_list(S,L).
   instantiation fault in string_list(_g50, _g52)
   [eclipse]: get_error_handler(4,M,N).
   M = error_handler/2
   N = sepia_kernel
   yes.
   [eclipse]: set_error_handler(4,true/0), string_list(S,L).
   > get_error_handler(4,true/0,sepia_kernel).
   S = _g56
   L = _g58
   yes.
Fail:
   get_error_handler(4, error/2, sepia_kernel).

   [eclipse]: set_error_handler(4,true/0),
   > get_error_handler(4,error_handler/2,M).
   no.
Error:
   get_error_handler(N,true/0,sepia_kernel).   (Error 4).
   get_error_handler(5,1.2,sepia_kernel).      (Error 5).
   get_error_handler(5.0,true/0,sepia_kernel). (Error 5).
   get_error_handler(1000,X, sepia_kernel).    (Error 6).
   get_error_handler(-1,X,sepia_kernel).       (Error 6).
   get_error_handler(6,t/0,"sepia_kernel").    (Error 6).


See Also

set_error_handler / 2, error / 2, error / 3, error_id / 2