-
Notifications
You must be signed in to change notification settings - Fork 7
/
LockFailException.cs
74 lines (69 loc) · 2.75 KB
/
LockFailException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// <copyright file="LockFailException.cs" company="Isopoh">
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
// </copyright>
namespace Isopoh.Cryptography.SecureArray
{
using System;
using System.Runtime.Serialization;
/// <summary>
/// Represents errors that occur trying to lock a buffer into memory.
/// </summary>
[Serializable]
public class LockFailException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="LockFailException"/> class.
/// </summary>
public LockFailException()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="LockFailException"/> class.
/// </summary>
/// <param name="message">
/// Text for the <see cref="Exception.Message" /> property.
/// </param>
#nullable enable
public LockFailException(string? message)
#nullable restore
: base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="LockFailException"/> class.
/// </summary>
/// <param name="message">
/// Text for the <see cref="Exception.Message" /> property.
/// </param>
/// <param name="innerException">
/// Exception that spawned this exception.
/// </param>
#nullable enable
public LockFailException(string? message, Exception? innerException)
#nullable restore
: base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="LockFailException"/> class with serialized data.
/// </summary>
/// <param name="info">
/// The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> that holds the serialized object data about the exception being thrown.
/// </param>
/// <param name="context">
/// The <see cref="T:System.Runtime.Serialization.StreamingContext"></see> that contains contextual information about the source or destination.
/// </param>
/// <exception cref="T:System.ArgumentNullException">
/// The <paramref name="info">info</paramref> parameter is null.
/// </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">
/// The class name is null or <see cref="P:System.Exception.HResult"></see> is zero (0).
/// </exception>
protected LockFailException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}