Explicitly erroring out on some failing commands that were not already included (#882)

* Excplitly erroring out on some failing commands that was not happening before

* Ensuring the error message goes through without getting converted to different error
This commit is contained in:
Udeesha Gautam
2019-10-25 15:41:59 -07:00
committed by GitHub
parent 22905c9c13
commit 57b7126ccf
2 changed files with 13 additions and 15 deletions

View File

@@ -485,7 +485,12 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
}
catch (BatchParserException ex)
{
if (ex.ErrorCode != ErrorCode.Aborted)
if (ex.ErrorCode == ErrorCode.UnsupportedCommand)
{
result = ScriptExecutionResult.Failure;
RaiseScriptError(string.Format(CultureInfo.CurrentCulture, ex.Message), ScriptMessageType.FatalError);
}
else if (ex.ErrorCode != ErrorCode.Aborted)
{
result = ScriptExecutionResult.Failure;
string info = ex.Text;