Catch a thrown exception