From 4fca14bf5af033dffc9a37e5a404ff7155ed27a4 Mon Sep 17 00:00:00 2001 From: Alex Bochkov Date: Sat, 4 Feb 2017 10:31:49 -0800 Subject: [PATCH] show error text --- SSMS_Tool/MainClass.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SSMS_Tool/MainClass.vb b/SSMS_Tool/MainClass.vb index 9525a37..6ac6ab2 100644 --- a/SSMS_Tool/MainClass.vb +++ b/SSMS_Tool/MainClass.vb @@ -208,7 +208,14 @@ Public Class Connect Dim result As TSqlFragment = SqlParser.Parse(New StringReader(OldStr), parseErrors) If parseErrors.Count > 0 Then - Throw New System.Exception("TSql120Parser unable format selected T-SQL due to an error in syntax..") + + Dim ErrorStr = "" + For Each StrError In parseErrors + ErrorStr = ErrorStr + vbNewLine + StrError.Message + Next + + Throw New System.Exception("TSql120Parser unable format selected T-SQL due to a syntax error." + vbNewLine + ErrorStr) + End If If Not txt.Selection.IsEmpty Then