1 //---------------------------------------------------------------------
2 // <copyright file="ObjectNotFoundException.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner  Microsoft, nkline
7 //---------------------------------------------------------------------
8 
9 namespace System.Data
10 {
11     using System;
12     using System.Data;
13     using System.Runtime.Serialization;
14     using System.Security.Permissions;
15 
16     /// <summary>
17     /// This exception is thrown when a requested object is not found in the store.
18     /// </summary>
19     [Serializable]
20     public sealed class ObjectNotFoundException : DataException
21     {
22         /// <summary>
23         /// Initializes a new instance of ObjectNotFoundException
24         /// </summary>
ObjectNotFoundException()25         public ObjectNotFoundException()
26             : base()
27         { }
28 
29         /// <summary>
30         /// Initializes a new instance of ObjectNotFoundException
31         /// </summary>
32         /// <param name="message"></param>
ObjectNotFoundException(string message)33         public ObjectNotFoundException(string message)
34             : base(message)
35         { }
36 
37         /// <summary>
38         /// Constructor that takes a message and an inner exception
39         /// </summary>
40         /// <param name="message"></param>
41         /// <param name="innerException"></param>
ObjectNotFoundException(string message, Exception innerException)42         public ObjectNotFoundException(string message, Exception innerException)
43             : base(message, innerException)
44         { }
45 
46         /// <summary>
47         /// Initializes a new instance of ObjectNotFoundException
48         /// </summary>
49         /// <param name="info"></param>
50         /// <param name="context"></param>
ObjectNotFoundException(SerializationInfo info, StreamingContext context)51         private ObjectNotFoundException(SerializationInfo info, StreamingContext context)
52             : base(info, context)
53         { }
54     }
55 }
56 
57