-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from myloveCc/dev
Add OutofMaxlengthException
- Loading branch information
Showing
4 changed files
with
181 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace NETCore.Encrypt | ||
{ | ||
/// <summary> | ||
/// The encrypt string out of max length exception | ||
/// </summary> | ||
public class OutofMaxlengthException:Exception | ||
{ | ||
/// <summary> | ||
/// The max length of ecnrypt data | ||
/// </summary> | ||
public int MaxLength { get; private set; } | ||
|
||
/// <summary> | ||
/// Error message | ||
/// </summary> | ||
|
||
public string ErrorMessage { get; set; } | ||
/// <summary> | ||
/// Ctor | ||
/// </summary> | ||
/// <param name="maxLength"></param> | ||
public OutofMaxlengthException(int maxLength) | ||
{ | ||
MaxLength = maxLength; | ||
} | ||
|
||
/// <summary> | ||
/// Ctor | ||
/// </summary> | ||
/// <param name="maxLength"></param> | ||
public OutofMaxlengthException(int maxLength, string message) : this(maxLength) | ||
{ | ||
ErrorMessage = message; | ||
} | ||
} | ||
} |
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