root/trunk/AprSharp/dev/src/AprException.cs

Revision 1, 1.4 kB (checked in by DenisG, 3 years ago)

Initial import

  • Property svn:eol-style set to native
Line 
1 //
2 // Softec
3 //
4 // Contact: Support@softec.st
5 //
6 // Designed by Denis Gervalle and Olivier Desaive
7 // Written by Denis Gervalle
8 //
9 // Copyright 2004 by SOFTEC. All rights reserved.
10 //
11
12 using System;
13 using System.Runtime.Serialization;
14 using Softec;
15
16 namespace Softec.AprSharp
17 {
18     [Serializable]
19     public class AprException : SoftecException
20     {
21         const int Result = unchecked ((int)0xA0400000);
22        
23         public AprException()
24                : base ( "An unknown exception from Apr Library has occured." )
25         {
26             HResult = Result;
27         }
28
29         public AprException(string s)
30                : base ( s )
31         {
32             HResult = Result;
33         }
34
35         public AprException(string s, Exception innerException)
36                : base ( s, innerException )
37         {
38             HResult = Result;
39         }
40
41         public AprException(int apr_status)
42                : base ( Apr.StrError(apr_status) )
43         {
44             HResult = unchecked (Result + apr_status);
45         }
46        
47         public AprException(int apr_status, Exception innerException)
48                : base ( Apr.StrError(apr_status), innerException )
49         {
50             HResult = unchecked (Result + apr_status);
51         }
52
53         public AprException(SerializationInfo info, StreamingContext context)
54                : base (info, context)
55         {
56         }
57     }
58 }
Note: See TracBrowser for help on using the browser.