Skip to content

Commit b51608f

Browse files
authored
Fix batch parse failure message to give clear description of what failed (#566)
1 parent d20215c commit b51608f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Microsoft.SqlTools.ServiceLayer/BatchParser/BatchParserWrapper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Collections.Generic;
99
using System.IO;
1010
using Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode;
11+
using System.Globalization;
1112

1213
namespace Microsoft.SqlTools.ServiceLayer.BatchParser
1314
{
@@ -347,7 +348,8 @@ private void OnBatchParserExecutionError(object sender, BatchParserExecutionErro
347348
{
348349

349350
Logger.Write(LogLevel.Verbose, SR.BatchParserWrapperExecutionError);
350-
throw new Exception(SR.BatchParserWrapperExecutionEngineError);
351+
throw new Exception(string.Format(CultureInfo.CurrentCulture,
352+
SR.BatchParserWrapperExecutionEngineError, args.Message + Environment.NewLine + '\t' + args.Description));
351353

352354
}
353355
}

0 commit comments

Comments
 (0)