testing if exceptions have been caught