Takes in generic Exception instead of specific RecognitionException.