add testcase for exceptions in callbacks
fix callback exception handling