Capturing error line on exception (SWI)
- From: "Mauro Di Nuzzo" <picorna@xxxxxxxxx>
- Date: Thu, 30 Jun 2005 15:26:18 +0200
Hi,
does anybody know how to get the error line of an error in swi prolog?
Before trying to explain I give you an example:
go :-
...,
ensure_loaded('myfile.pl'),
...
if an error occurs in 'myfile.pl' an error message is printed which tell me
the error line no.
But suppose I am currently use catch/3 or call_cleanup/3...
how can I get the error line number?
I firstly tried to access the stream_property/2 (with $stream_position)
using current_input/1, but I realized that the stream associated with
'myfile.pl' is suddenly closed after an error occurs (ie. it does no longer
exist when I call current_input/1, which fails).
Does any way to get the error line number exist, when we consult external
files?
Thank you.
M
.
- Follow-Ups:
- Re: Capturing error line on exception (SWI)
- From: Jan Wielemaker
- Re: Capturing error line on exception (SWI)
- Prev by Date: Re: newbie question about Prolog / FOPC / NLU
- Next by Date: How make qcompile/1 silent? (SWI)
- Previous by thread: newbie question about Prolog / FOPC / NLU
- Next by thread: Re: Capturing error line on exception (SWI)
- Index(es):
Relevant Pages
|
|