Removing optional data property from Error response class (#325)

* Removing optional data property from Error response class

* Fixing broken unit tests
This commit is contained in:
Benjamin Russell
2017-04-24 13:45:33 -07:00
committed by GitHub
parent cf9a81aec9
commit e65699ef75
9 changed files with 26 additions and 57 deletions

View File

@@ -39,14 +39,13 @@ namespace Microsoft.SqlTools.Hosting.Protocol
eventParams);
}
public virtual Task SendError(string errorMessage, int errorCode = 0, object data = null)
public virtual Task SendError(string errorMessage, int errorCode = 0)
{
// Build the error message
Error error = new Error
{
Message = errorMessage,
Code = errorCode,
Data = data
Code = errorCode
};
return this.messageWriter.WriteMessage(
Message.ResponseError(
@@ -58,7 +57,7 @@ namespace Microsoft.SqlTools.Hosting.Protocol
public virtual Task SendError(Exception e)
{
// Overload to use the parameterized error handler
return SendError(e.Message, e.HResult, e.ToString());
return SendError(e.Message, e.HResult);
}
}
}