catching throwable in order to intercept assertion errors