RegisterErrorExplainer:
PROC [error:
ERRANY, explain: Explainer ¬
NIL, data:
REF ¬
NIL];
A registerd Explainer is called when a raised signal or error is not caught, just before calling the system debugger. It might also be called by certain clients providing a catch phrase. The returned rope is presented to the user. Explainers are procedures, not catch phrases, there are no GOTOs out of them.
It is ok for Explainers to raise errors, but watch for infinite recursion. However, in general Explainers should be fast and avoid raising further unintended errors: after all they are used to avoid some debugging sessions.
It is ok to use NIL for Explainer's if data is a Rope.ROPE or a REF TEXT.
Note that fancy packages might use ProcessProps-like mechanisms to pass more information about an error to a Explainer.
Registering an Explainer for a signal not implemented by the client itself is considered rude. There is only one registered Explainer for every signal; if this mechanism is only used by the signal implementor there will never be any confusion.
Raise:
PROC [signalOrError:
SIGANY, args:
POINTER];
Raises the given signal/error with the given arguments (and no place to store results).
Should it not be possible to raise the signal/error, Raise acts as no op. (PrincOps!)