[PATCH 33/42] test: Separate out the exception handling