SWI-Prolog Did You Know Did you know? about the full featured web framework Search Documentation:
Predicate error_term/2