Mercurial > pub > bltoolkit
comparison Source/Data/Linq/LinqException.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 using System.Runtime.Serialization; | |
3 | |
4 namespace BLToolkit.Data.Linq | |
5 { | |
6 /// <summary> | |
7 /// Defines the base class for the namespace exceptions. | |
8 /// </summary> | |
9 /// <remarks> | |
10 /// This class is the base class for exceptions that may occur during | |
11 /// execution of the namespace members. | |
12 /// </remarks> | |
13 [Serializable] | |
14 public class LinqException : Exception | |
15 { | |
16 /// <summary> | |
17 /// Initializes a new instance of the <see cref="LinqException"/> class. | |
18 /// </summary> | |
19 /// <remarks> | |
20 /// This constructor initializes the <see cref="Exception.Message"/> | |
21 /// property of the new instance | |
22 /// to a system-supplied message that describes the error, | |
23 /// such as "BLToolkit Linq error has occurred." | |
24 /// </remarks> | |
25 public LinqException() | |
26 : base("A BLToolkit Linq error has occurred.") | |
27 { | |
28 } | |
29 | |
30 /// <summary> | |
31 /// Initializes a new instance of the <see cref="LinqException"/> class | |
32 /// with the specified error message. | |
33 /// </summary> | |
34 /// <param name="message">The message to display to the client when the exception is thrown.</param> | |
35 /// <param name="args">An System.Object array containing zero or more objects to format.</param> | |
36 /// <seealso cref="Exception.Message"/> | |
37 [JetBrains.Annotations.StringFormatMethod("args")] | |
38 public LinqException(string message, params object[] args) | |
39 : base(string.Format(message, args)) | |
40 { | |
41 } | |
42 | |
43 /// <summary> | |
44 /// Initializes a new instance of the <see cref="LinqException"/> class | |
45 /// with the specified error message and InnerException property. | |
46 /// </summary> | |
47 /// <param name="message">The message to display to the client when the exception is thrown.</param> | |
48 /// <param name="innerException">The InnerException, if any, that threw the current exception.</param> | |
49 /// <seealso cref="Exception.Message"/> | |
50 /// <seealso cref="Exception.InnerException"/> | |
51 public LinqException(string message, Exception innerException) | |
52 : base(message, innerException) | |
53 { | |
54 } | |
55 | |
56 /// <summary> | |
57 /// Initializes a new instance of the <see cref="LinqException"/> class | |
58 /// with the InnerException property. | |
59 /// </summary> | |
60 /// <param name="innerException">The InnerException, if any, that threw the current exception.</param> | |
61 /// <seealso cref="Exception.InnerException"/> | |
62 public LinqException(Exception innerException) | |
63 : base(innerException.Message, innerException) | |
64 { | |
65 } | |
66 | |
67 #if !SILVERLIGHT | |
68 | |
69 /// <summary> | |
70 /// Initializes a new instance of the <see cref="LinqException"/> class | |
71 /// with serialized data. | |
72 /// </summary> | |
73 /// <param name="info">The object that holds the serialized object data.</param> | |
74 /// <param name="context">The contextual information about the source or destination.</param> | |
75 /// <remarks> | |
76 /// This constructor is called during deserialization to | |
77 /// reconstitute the exception object transmitted over a stream. | |
78 /// </remarks> | |
79 protected LinqException(SerializationInfo info, StreamingContext context) | |
80 : base(info, context) | |
81 { | |
82 } | |
83 | |
84 #endif | |
85 } | |
86 } | |
87 |