Did you know? condition is an alternative to exceptionsSearch Documentation:
SWI-Prolog owl logoPredicate term_to_atom/2