fix try/catch and add error handling example to test/rules.nga