PageRenderTime 20ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Mercurial.Net/MercurialException.cs

#
C# | 67 lines | 24 code | 4 blank | 39 comment | 0 complexity | 177e91e7f5976d12876d5a16b978c81b MD5 | raw file
 1using System;
 2using System.Runtime.Serialization;
 3
 4namespace Mercurial
 5{
 6    /// <summary>
 7    /// Represents errors related to Mercurial.
 8    /// </summary>
 9    [Serializable]
10    public class MercurialException : Exception
11    {
12        /// <summary>
13        /// Initializes a new instance of the <see cref = "MercurialException" /> class.
14        /// </summary>
15        /// <param name="info">The <see cref = "T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
16        /// <param name="context">The <see cref = "T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
17        /// <exception cref = "T:System.ArgumentNullException">
18        /// The <paramref name = "info" /> parameter is null.
19        /// </exception>
20        /// <exception cref = "T:System.Runtime.Serialization.SerializationException">
21        /// The class name is null or <see cref = "P:System.Exception.HResult" /> is zero (0).
22        /// </exception>
23        protected MercurialException(SerializationInfo info, StreamingContext context)
24            : base(info, context)
25        {
26            // Do nothing here
27        }
28
29        /// <summary>
30        /// Initializes a new instance of the <see cref = "MercurialException" /> class.
31        /// </summary>
32        public MercurialException()
33        {
34            // Do nothing here
35        }
36
37        /// <summary>
38        /// Initializes a new instance of the <see cref = "MercurialException" /> class
39        /// with a specific error message.
40        /// </summary>
41        /// <param name="message">The message.</param>
42        public MercurialException(string message)
43            : base(message)
44        {
45            // Do nothing here
46        }
47
48        /// <summary>
49        /// Initializes a new instance of the <see cref = "MercurialException" /> class
50        /// s with a specified error message and a reference to the inner exception
51        /// that is the cause of this exception.
52        /// </summary>
53        /// <param name="message">
54        /// The error message that explains the reason for the exception. 
55        /// </param>
56        /// <param name="innerException">
57        /// The exception that is the cause of the current exception,
58        /// or a <c>null</c> reference (<c>Nothing</c> in Visual Basic)
59        /// if no inner exception is specified. 
60        /// </param>
61        public MercurialException(string message, Exception innerException)
62            : base(message, innerException)
63        {
64            // Do nothing here
65        }
66    }
67}