| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
Exceptions\ForeignKeyException.cs | - | - | 0.0 % | 0.0 % |
|
1 | ||
2 | #region Apache Notice | |
3 | /***************************************************************************** | |
4 | * $Header: $ | |
5 | * $Revision: $ | |
6 | * $Date: $ | |
7 | * | |
8 | * iBATIS.NET Data Mapper | |
9 | * Copyright (C) 2004 - Gilles Bayon | |
10 | * | |
11 | * | |
12 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
13 | * you may not use this file except in compliance with the License. | |
14 | * You may obtain a copy of the License at | |
15 | * | |
16 | * http://www.apache.org/licenses/LICENSE-2.0 | |
17 | * | |
18 | * Unless required by applicable law or agreed to in writing, software | |
19 | * distributed under the License is distributed on an "AS IS" BASIS, | |
20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
21 | * See the License for the specific language governing permissions and | |
22 | * limitations under the License. | |
23 | * | |
24 | ********************************************************************************/ | |
25 | #endregion | |
26 | ||
27 | using System; | |
28 | using System.Runtime.Serialization; | |
29 | ||
30 | namespace IBatisNet.Common.Exceptions | |
31 | { | |
32 | /// <summary> | |
33 | /// A DALForeignKeyException is thrown when foreign key error occured in a sql statement. | |
34 | /// </summary> | |
35 | /// <remarks> | |
36 | /// This exception is not used by the framework. | |
37 | /// </remarks> | |
38 | [Serializable] | |
39 | public class ForeignKeyException : IBatisNetException | |
40 | { | |
41 | /// <summary> | |
42 | /// Initializes a new instance of the <b>DalException</b> class. | |
43 | /// </summary> | |
44 | /// <remarks> | |
45 | /// This constructor initializes the <para>Message</para> property of the new instance | |
46 | /// to a system-supplied message that describes the error. | |
47 | /// </remarks> | |
48 | 0 | public ForeignKeyException() : base("A foreign key conflict has occurred.") { } |
49 | ||
50 | /// <summary> | |
51 | /// Initializes a new instance of the <see cref="IBatisNet.Common.Exceptions.ForeignKeyException"/> | |
52 | /// class with a reference to the inner exception that is the cause of this exception. | |
53 | /// </summary> | |
54 | /// <remarks> | |
55 | /// This constructor initializes the Message property of the new instance to the Message property | |
56 | /// of the passed in exception. | |
57 | /// </remarks> | |
58 | /// <param name="ex"> | |
59 | /// The exception that is the cause of the current exception. | |
60 | /// If the innerException parameter is not a null reference (Nothing in Visual Basic), | |
61 | /// the current exception is raised in a catch block that handles the inner exception. | |
62 | /// </param> | |
63 | 0 | public ForeignKeyException(Exception ex) : base (ex.Message,ex) {} |
64 | ||
65 | /// <summary> | |
66 | /// Initializes a new instance of the <see cref="IBatisNet.Common.Exceptions.ForeignKeyException"/> | |
67 | /// class with a specified error message. | |
68 | /// </summary> | |
69 | /// <remarks> | |
70 | /// This constructor initializes the Message property of the new instance using | |
71 | /// the message parameter. | |
72 | /// </remarks> | |
73 | /// <param name="message">The message that describes the error.</param> | |
74 | 0 | public ForeignKeyException( string message ) : base ( message ) { } |
75 | ||
76 | /// <summary> | |
77 | /// Initializes a new instance of the <see cref="IBatisNet.Common.Exceptions.ForeignKeyException"/> | |
78 | /// class with a specified error message and a reference to the inner exception that is the cause of this exception. | |
79 | /// </summary> | |
80 | /// <remarks> | |
81 | /// An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. | |
82 | /// The InnerException property returns the same value that is passed into the constructor, or a null reference (Nothing in Visual Basic) if the InnerException property does not supply the inner exception value to the constructor. | |
83 | /// </remarks> | |
84 | /// <param name="message">The message that describes the error.</param> | |
85 | /// <param name="inner">The exception that caused the error</param> | |
86 | 0 | public ForeignKeyException( string message, Exception inner ) : base ( message, inner ) { } |
87 | ||
88 | /// <summary> | |
89 | /// Initializes a new instance of the Exception class with serialized data. | |
90 | /// </summary> | |
91 | /// <remarks> | |
92 | /// This constructor is called during deserialization to reconstitute the exception | |
93 | /// object transmitted over a stream. | |
94 | /// </remarks> | |
95 | /// <param name="info"> | |
96 | /// The <see cref="System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown. | |
97 | /// </param> | |
98 | /// <param name="context"> | |
99 | /// The <see cref="System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination. | |
100 | /// </param> | |
101 | 0 | protected ForeignKeyException(SerializationInfo info, StreamingContext context) : base (info, context) {} |
102 | ||
103 | } | |
104 | } | |
105 |
|