Situations might demand that a secondary thread controls a primary thread. The programming interface allows raising a soft signal in a primary Prolog thread from a secondary thread. The effect on the primary Prolog thread will be that the signal message is thrown as an error the first possible moment a call port is reached.
error(system_error(_),_)
The secondary thread is free to signal whatever message it likes.
Among the errors the Prolog system recognizes urgent errors as
above. Urgent errors are automatically passed down in a catch/3.
An example of such an urgent error is the error issued by the
predicate abort/1. Urgent errors can still be catched by the
predicate sys_trap/3.
The error terms are displayed using the multilingual strings
facility. Whereby strings acting as formatting templates are used
when the error term has further parameters. Multilingual strings
can be retrieved by the predicates get_string/[2,3]. Multilingual
strings can be defined by ex-tending the predicate string/3.
Locales are assumed underscore separated.
The following signal predicates are provided: