Skip to content

Commit

Permalink
show error text
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Bochkov committed Feb 4, 2017
1 parent 0da92c3 commit 4fca14b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion SSMS_Tool/MainClass.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fca14b

Please sign in to comment.