-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: custom exceptions fwk/vs/core https://learn.microsoft.com/en-gb/…
- Loading branch information
1 parent
14a9dde
commit 016d1d2
Showing
3 changed files
with
135 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,73 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace BCryptNet | ||
{ | ||
/// <summary>Exception for signalling parse errors during salt checks. </summary> | ||
public class SaltParseException : Exception | ||
#if NETFRAMEWORK | ||
/// <summary> | ||
/// Exception used to signal errors that occur during use salt parsing | ||
/// </summary> | ||
[Serializable] | ||
public sealed class SaltParseException : Exception | ||
{ | ||
/// <summary>Default constructor. </summary> | ||
/// <summary> | ||
/// Default Constructor | ||
/// </summary> | ||
protected SaltParseException() | ||
{ | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected SaltParseException(SerializationInfo info, StreamingContext streamingContext) : base(info, streamingContext) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="SaltParseException" />. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
public SaltParseException(string message) : base(message) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="SaltParseException" />. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
/// <param name="innerException"></param> | ||
public SaltParseException(string message, Exception innerException) : base(message, innerException) | ||
{ | ||
} | ||
} | ||
#else | ||
/// <summary> | ||
/// Exception used to signal errors that occur during salt parsing | ||
/// </summary> | ||
public sealed class SaltParseException : Exception | ||
{ | ||
/// <summary> | ||
/// Default Constructor | ||
/// </summary> | ||
public SaltParseException() | ||
{ | ||
} | ||
|
||
/// <summary>Initializes a new instance of <see cref="SaltParseException" />.</summary> | ||
/// <param name="message">The message.</param> | ||
public SaltParseException(string message) | ||
: base(message) | ||
/// <summary> | ||
/// Initializes a new instance of <see cref="SaltParseException" />. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
public SaltParseException(string message) : base(message) | ||
{ | ||
} | ||
|
||
/// <summary>Initializes a new instance of <see cref="SaltParseException" />.</summary> | ||
/// <param name="message"> The message.</param> | ||
/// <param name="innerException">The inner exception.</param> | ||
public SaltParseException(string message, Exception innerException) | ||
: base(message, innerException) | ||
/// <summary> | ||
/// Initializes a new instance of <see cref="SaltParseException" />. | ||
/// </summary> | ||
/// <param name="message"></param> | ||
/// <param name="innerException"></param> | ||
public SaltParseException(string message, Exception innerException) : base(message, innerException) | ||
{ | ||
} | ||
} | ||
#endif | ||
} |