From vannoord@let.rug.nl  Tue Nov  2 20:42:30 1999
Received: from froh.let.rug.nl (vannoord@froh.let.rug.nl [129.125.8.25])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA04605
	for <prolog@swi.psy.uva.nl>; Tue, 2 Nov 1999 20:42:30 +0100 (MET)
Received: (from vannoord@localhost)
	by froh.let.rug.nl (8.9.3/8.9.3) id UAA24357;
	Tue, 2 Nov 1999 20:42:34 +0100 (MET)
From: "Noord G.J.M. van" <vannoord@let.rug.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Tue,  2 Nov 1999 20:42:33 +0100 (MET)
To: prolog@swi.psy.uva.nl
Subject: exception/3
X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs  Lucid
Message-ID: <14367.14629.796820.550435@froh.let.rug.nl>


why doens't exception work the way it is described in the manual?
(version 3.2.9 on HP-UX 10.20)

If I define exception/3 to treat a unknown predicate, then apparantly
exception/3 is called succesfully, but swi prints an error message of 
its own nonetheless...

Moreover, goals which are typed to the input prompt are not passed on
to exception/3 at all ??? (Is there a difference between an
undefined predicate and an undefined procedure?)

Ex:

consult(user).
| exception(undefined_predicate,X,fail):-
|    format(user_error,"undef: ~w~n",[X]).
| ^D
user compiled, 0.00 sec, 328 bytes.

Yes
7 ?- jan.
[WARNING: Undefined predicate: `jan/0']

No
8 ?- [user].
2 |: jan :- piet.
2 |:
user compiled, 0.00 sec, 0 bytes.

Yes
9 ?- jan.
[WARNING: Undefined procedure: piet/0]
   Exception: (  8) piet ?                       



Another question, is there a way to `hook' print_message/2 so that
I can provide message printers for my own exceptions?

- 
Gertjan van Noord Alfa-informatica, RUG,  Postbus 716, 9700 AS Groningen
vannoord at let dot rug dot nl            http://www.let.rug.nl/~vannoord/

