Repository navigation
Expand file tree
/
Copy pathItemNotFoundException.cs
More file actions
59 lines (51 loc) · 2.66 KB
/
Copy pathItemNotFoundException.cs
File metadata and controls
59 lines (51 loc) · 2.66 KB
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
//------------------------------------------------------------------------------
// <copyright company="LeanKit Inc.">
// Copyright (c) LeanKit Inc. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Runtime.Serialization;
namespace LeanKit.API.Client.Library.Exceptions
{
[Serializable]
public class ItemNotFoundException : Exception
{
#region Constructors
/// <overloads>Initializes a new instance of the <see cref="ItemNotFoundException" /> class.</overloads>
/// <summary>
/// Initializes a new instance of the <see cref="ItemNotFoundException" /> class with the default error
/// message.
/// </summary>
public ItemNotFoundException() : this(null, null) { }
/// <summary>
/// Initializes a new instance of the <see cref="ItemNotFoundException" /> class with a specified error
/// message.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
public ItemNotFoundException(string message) : this(message, null) { }
/// <summary>
/// Initializes a new instance of the <see cref="ItemNotFoundException" /> class with the default error
/// message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="innerException">The exception that is the cause of the current exception.</param>
public ItemNotFoundException(Exception innerException) : this(null, innerException) { }
/// <summary>
/// Initializes a new instance of the <see cref="ItemNotFoundException" /> class with a specified error
/// message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message">The error message that explains the reason for the exception.</param>
/// <param name="innerException">The exception that is the cause of the current exception.</param>
public ItemNotFoundException(string message, Exception innerException)
: base(
string.IsNullOrEmpty(message)
? (innerException != null
? innerException.Message
: "The specified item could not be located. Please check the item identifier.")
: message, innerException) { }
/// <summary>Initializes a new instance of the <see cref="ItemNotFoundException" /> class with serialized data.</summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected ItemNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endregion
}
}