Iterating on the Prolog error handler code