-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e81503
commit aef40d0
Showing
10 changed files
with
152 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Microsoft.SqlServer.Server | ||
{ | ||
/// <include file='../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/InvalidUdtException/*' /> | ||
[Serializable] | ||
public sealed class InvalidUdtException : SystemException | ||
{ | ||
private const int InvalidUdtHResult = unchecked((int)0x80131937); | ||
|
||
internal InvalidUdtException() : base() | ||
{ | ||
HResult = InvalidUdtHResult; | ||
} | ||
|
||
internal InvalidUdtException(string message) : base(message) | ||
{ | ||
HResult = InvalidUdtHResult; | ||
} | ||
|
||
internal InvalidUdtException(string message, Exception innerException) : base(message, innerException) | ||
{ | ||
HResult = InvalidUdtHResult; | ||
} | ||
|
||
private InvalidUdtException(SerializationInfo si, StreamingContext sc) : base(si, sc) | ||
{ | ||
} | ||
|
||
/// <include file='../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/GetObjectData/*' /> | ||
[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] | ||
public override void GetObjectData(SerializationInfo si, StreamingContext context) | ||
{ | ||
base.GetObjectData(si, context); | ||
} | ||
|
||
internal static InvalidUdtException Create(Type udtType, string resourceReason) | ||
{ | ||
string reason = StringsHelper.GetString(resourceReason); | ||
string message = StringsHelper.GetString(Strings.SqlUdt_InvalidUdtMessage, udtType.FullName, reason); | ||
InvalidUdtException e = new InvalidUdtException(message); | ||
return e; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.