Mercurial > pub > bltoolkit
comparison Source/Mapping/MappingException.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.Mapping | |
| 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 /// the execution of the <see cref="Map"/> class and other namespace members. | |
| 12 /// </remarks> | |
| 13 [Serializable] | |
| 14 public class MappingException : Exception | |
| 15 { | |
| 16 /// <summary> | |
| 17 /// Initializes a new instance of the <see cref="MappingException"/> 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 "A Mapping exception has occurred." | |
| 24 /// </remarks> | |
| 25 public MappingException() | |
| 26 : base("A Mapping exception has occurred.") | |
| 27 { | |
| 28 } | |
| 29 | |
| 30 /// <summary> | |
| 31 /// Initializes a new instance of the <see cref="MappingException"/> class | |
| 32 /// with the specified error message. | |
| 33 /// </summary> | |
| 34 /// <param name="message">The message to display to the client when the | |
| 35 /// exception is thrown.</param> | |
| 36 /// <seealso cref="Exception.Message"/> | |
| 37 public MappingException(string message) | |
| 38 : base(message) | |
| 39 { | |
| 40 } | |
| 41 | |
| 42 /// <summary> | |
| 43 /// Initializes a new instance of the <see cref="MappingException"/> class | |
| 44 /// with the specified error message and InnerException property. | |
| 45 /// </summary> | |
| 46 /// <param name="message">The message to display to the client when the | |
| 47 /// exception is thrown.</param> | |
| 48 /// <param name="innerException">The InnerException, if any, that threw | |
| 49 /// the current exception.</param> | |
| 50 /// <seealso cref="Exception.Message"/> | |
| 51 /// <seealso cref="Exception.InnerException"/> | |
| 52 public MappingException(string message, Exception innerException) | |
| 53 : base(message, innerException) | |
| 54 { | |
| 55 } | |
| 56 | |
| 57 /// <summary> | |
| 58 /// Initializes a new instance of the <see cref="MappingException"/> class | |
| 59 /// with the specified InnerException property. | |
| 60 /// </summary> | |
| 61 /// exception is thrown.</param> | |
| 62 /// <param name="innerException">The InnerException, if any, that threw | |
| 63 /// the current exception.</param> | |
| 64 /// <seealso cref="Exception.InnerException"/> | |
| 65 public MappingException(Exception innerException) | |
| 66 : base(innerException.Message, innerException) | |
| 67 { | |
| 68 } | |
| 69 | |
| 70 #if !SILVERLIGHT | |
| 71 | |
| 72 /// <summary> | |
| 73 /// Initializes a new instance of the <see cref="MappingException"/> class | |
| 74 /// with serialized data. | |
| 75 /// </summary> | |
| 76 /// <param name="info">The object that holds the serialized object data.</param> | |
| 77 /// <param name="context">The contextual information about the source or | |
| 78 /// destination.</param> | |
| 79 /// <remarks>This constructor is called during deserialization to | |
| 80 /// reconstitute the exception object transmitted over a stream.</remarks> | |
| 81 protected MappingException(SerializationInfo info, StreamingContext context) | |
| 82 : base(info,context) | |
| 83 { | |
| 84 } | |
| 85 | |
| 86 #endif | |
| 87 } | |
| 88 } |
