Did you know ... Search Documentation:
Prolog exceptions in foreign code