Throw Exception when SQL compile error