projog

3.67. throw(X) - throws an exception with the given message.

Examples

?- throw(error_message).

Error: error_message

?- throw(a(1,[x,y,z])).

Error: a(1, [x,y,z])