mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 17:24:00 -05:00
Move managed parser into its own project (test code coverage) (#774)
* Created New ManagedBatchParser project in .NetStandard * Addressing PR Comments * Resolve 'No Repository' warning. * Move batch parser tests to integrations test project * Fix SLN file
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an error produced by SQL Server database schema provider
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class SqlServerError : DataSchemaError
|
||||
{
|
||||
private const string SqlServerPrefix = "SQL";
|
||||
private const string DefaultHelpKeyword = "vs.teamsystem.datatools.DefaultErrorMessageHelp";
|
||||
|
||||
public SqlServerError(string message, string document, ErrorSeverity severity)
|
||||
: this(message, null, document, 0, 0, Constants.UndefinedErrorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(string message, string document, int errorCode, ErrorSeverity severity)
|
||||
: this(message, null, document, 0, 0, errorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(Exception exception, string document, int errorCode, ErrorSeverity severity)
|
||||
: this(exception, document, 0, 0, errorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(string message, string document, int line, int column, ErrorSeverity severity)
|
||||
: this(message, null, document, line, column, Constants.UndefinedErrorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(
|
||||
Exception exception,
|
||||
string document,
|
||||
int line,
|
||||
int column,
|
||||
int errorCode,
|
||||
ErrorSeverity severity) :
|
||||
this(exception.Message, exception, document, line, column, errorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(
|
||||
string message,
|
||||
string document,
|
||||
int line,
|
||||
int column,
|
||||
int errorCode,
|
||||
ErrorSeverity severity) :
|
||||
this(message, null, document, line, column, errorCode, severity)
|
||||
{
|
||||
}
|
||||
|
||||
public SqlServerError(
|
||||
string message,
|
||||
Exception exception,
|
||||
string document,
|
||||
int line,
|
||||
int column,
|
||||
int errorCode,
|
||||
ErrorSeverity severity) :
|
||||
base(message, exception, document, line, column, SqlServerPrefix, errorCode, severity)
|
||||
{
|
||||
this.HelpKeyword = DefaultHelpKeyword;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user