What is the simplest counterpart of consulterror?
Posted: 8 Dec 2013 12:08
Hi
The good old PDC Prolog contained simple predicates showing the position of errors in consulted files:
Using this and trap(...) I could easily show the erroneous data file and jump to the position of the error.
The current runtime exceptions
return very complicate structures.
How can I simply extract the output
from the descriptor structure?
The good old PDC Prolog contained simple predicates showing the position of errors in consulted files:
Code: Select all
readtermerror(LineWithError,ErrorPosInLine)
(string,Unsigned) - (o,o)
consulterror(LineWithError,ErrorPosInLine,ErrorPosInFile)
(string,integer,ulong) - (o,o,o)
The current runtime exceptions
Code: Select all
runtime_exception::consult_WrongComment/3
runtime_exception::consult_WrongUsageOfKeyword/3
return very complicate structures.
Code: Select all
getDescriptor_nd : (traceId TraceID) -> descriptor Descriptor nondeterm.
% @short Returns the descriptor.
% @end
Code: Select all
LineWithError,ErrorPosInLine,ErrorPosInFile