| Did you know ... | Search Documentation: |
| pce->catch_error |
|chain]<-last_error.
The method pce->catch_pop
restores the catched errors to the state before invoking pce->catch_error.
The prolog predicate pce_catch_error/2 provides an interface:
?- send(@pce, hello, pce).
[PCE error: send: No implementation for: @pce/pce ->hello
in: send(@pce/pce, hello, pce)]
PCE: 1 fail: send(@pce/pce, hello, pce) ?
While
?- pce_catch_error(no_behaviour,
send(@pce, hello, pce)).
No
After which
?- get(@pce, last_error, E). ==> E = no_behaviour
Note that errors with pce<-feedback:
throw can also be handled using Prolog exception-handling.
->catch_pop ->catched -catched_errors