more work related to translation of exceptions between Prolog and Java