s-webber / projog

Prolog programming for the Java platform.
Apache License 2.0
34 stars 9 forks source link

add throw/1 built-in predicate #219

Closed s-webber closed 1 year ago

s-webber commented 1 year ago

Add throw/1 built-in predicate. Throws an exception with the given argument as the exception message.

Example:

?- throw(error(invalid_type, X)).

Error: error(invalid_type, X)