add checker.throw function to catch exceptions