updated test exception handling