swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

Minor: executing `type_error(X,X)` on the toplevel leads to various unexpected messages

Open dtonhofer opened this issue 3 years ago • 0 comments

We find:

?- type_error(X,X).
ERROR: Arithmetic: `evaluable' is not a function
ERROR: In:
ERROR:   [11] throw(error(type_error(_4822,_4824),_4818))
ERROR:    [9] toplevel_call(user:user: ...) at /usr/local/logic/swipl/lib/swipl/boot/toplevel.pl:1113
ERROR: 
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
?- type_error(X,Y).
ERROR: Type error: `_11888' contains attributed variables
ERROR: In:
ERROR:   [11] throw(error(type_error(_11942,_11944),_11938))
ERROR:    [9] toplevel_call(user:user: ...) at /usr/local/logic/swipl/lib/swipl/boot/toplevel.pl:1113

But:

?- catch(type_error(X,X),T,true).
T = error(type_error(_6376, _6376), _6372).

?- catch(type_error(X,Y),T,true).
T = error(type_error(_3092, _3094), _3088).

dtonhofer avatar Dec 02 '20 12:12 dtonhofer