I am reading the throw/1 documentation and expected error term and can’t figure it out / get it to work. Could someone post a simple example how to handle a custom error via a corresponding catch and throw
… no idea how iso errors fit into this as well …
scanning the list of iso error types, none really fit to what the error means – its a semantic kind of error, specific to the algorithm i am working on.
Exceptions of the from error(Formal, Context) are special. If Context is left unbound the system will fill it with a stack trace if the exception is not caught and the system will try to start the debugger as ealy as possible in an interactive session.
Define rules for prolog:error_message//1 to print error/2 messages based on
the first argument or prolog:message//1 to handle any exception term.