Did you know ... Search Documentation:
Convenient functions to generate Prolog exceptions