1 |
|
/* |
2 |
|
* DotGNU XmlRpc implementation |
3 |
|
* |
4 |
|
* Copyright (C) 2003 Free Software Foundation, Inc. |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
8 |
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
* (at your option) any later version. |
10 |
|
* |
11 |
|
* This program is distributed in the hope that it will be useful, |
12 |
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
* GNU General Public License for more details. |
15 |
|
* |
16 |
|
* You should have received a copy of the GNU General Public License |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
|
* |
20 |
|
* $Revision$ $Date$ |
21 |
|
* |
22 |
|
* -------------------------------------------------------------------------- |
23 |
|
*/ |
24 |
|
using System; |
25 |
|
using System.Xml; |
26 |
|
|
27 |
|
namespace DotGNU.XmlRpc |
28 |
|
{ |
29 |
|
public class XmlRpcException : Exception |
30 |
|
{ |
31 |
|
private int faultCode; |
32 |
|
|
33 |
|
public XmlRpcException( int faultCode, string message ) |
34 |
|
: base( message ) |
35 |
|
{ |
36 |
|
base.HResult = faultCode; |
37 |
|
} |
38 |
|
|
39 |
|
public XmlRpcException( Exception e ) : base( e.Message ) |
40 |
|
{ |
41 |
|
base.HResult = e.HResult; |
42 |
|
} |
43 |
|
|
44 |
|
public int FaultCode |
45 |
|
{ |
46 |
|
get { |
47 |
|
return this.HResult; |
48 |
|
} |
49 |
|
} |
50 |
|
} |
51 |
|
|
52 |
|
public class XmlRpcBadFormatException : XmlRpcException |
53 |
|
{ |
54 |
|
public XmlRpcBadFormatException( int faultCode, string message ) |
55 |
|
: base( faultCode, message ) |
56 |
|
{ |
57 |
|
} |
58 |
|
} |
59 |
|
|
60 |
|
public class XmlRpcInvalidStateException : XmlRpcException |
61 |
|
{ |
62 |
|
public XmlRpcInvalidStateException( string message ) |
63 |
|
: base( 200, message ) |
64 |
|
{ |
65 |
|
} |
66 |
|
} |
67 |
|
|
68 |
|
public class XmlRpcInvalidXmlRpcException : ApplicationException |
69 |
|
{ |
70 |
|
public XmlRpcInvalidXmlRpcException() { } |
71 |
|
public XmlRpcInvalidXmlRpcException( String text ) : base(text) { } |
72 |
|
public XmlRpcInvalidXmlRpcException( String text, Exception iex ) |
73 |
|
: base(text, iex) { } |
74 |
|
} |
75 |
|
|
76 |
|
public class XmlRpcBadMethodException : ApplicationException |
77 |
|
{ |
78 |
|
public XmlRpcBadMethodException() { } |
79 |
|
public XmlRpcBadMethodException( String text ) : base(text) { } |
80 |
|
public XmlRpcBadMethodException( String text, Exception iex ) |
81 |
|
: base(text, iex) { } |
82 |
|
} |
83 |
|
|
84 |
|
public class XmlRpcBadValueException : ApplicationException |
85 |
|
{ |
86 |
|
public XmlRpcBadValueException() { } |
87 |
|
public XmlRpcBadValueException( String text ) : base(text) { } |
88 |
|
public XmlRpcBadValueException( String text, Exception iex ) |
89 |
|
: base(text, iex) { } |
90 |
|
} |
91 |
|
|
92 |
|
public class XmlRpcNullReferenceException : ApplicationException |
93 |
|
{ |
94 |
|
public XmlRpcNullReferenceException() { } |
95 |
|
public XmlRpcNullReferenceException( String text ) : base(text) { } |
96 |
|
public XmlRpcNullReferenceException( String text, Exception iex ) |
97 |
|
: base(text, iex) { } |
98 |
|
} |
99 |
|
|
100 |
|
public class XmlRpcInvalidParametersException : ApplicationException |
101 |
|
{ |
102 |
|
public XmlRpcInvalidParametersException() { } |
103 |
|
public XmlRpcInvalidParametersException( String text ) : base(text) { } |
104 |
|
public XmlRpcInvalidParametersException( String text, Exception iex ) |
105 |
|
: base(text, iex) { } |
106 |
|
} |
107 |
|
|
108 |
|
public class XmlRpcTypeMismatchException : ApplicationException |
109 |
|
{ |
110 |
|
public XmlRpcTypeMismatchException() { } |
111 |
|
public XmlRpcTypeMismatchException( String text ) : base(text) { } |
112 |
|
public XmlRpcTypeMismatchException( String text, Exception iex ) |
113 |
|
: base(text, iex) { } |
114 |
|
} |
115 |
|
|
116 |
|
public class XmlRpcBadAssemblyException : ApplicationException |
117 |
|
{ |
118 |
|
public XmlRpcBadAssemblyException() { } |
119 |
|
public XmlRpcBadAssemblyException( String text ) : base(text) { } |
120 |
|
public XmlRpcBadAssemblyException( String text, Exception iex ) |
121 |
|
: base(text, iex) { } |
122 |
|
} |
123 |
|
|
124 |
|
} |
125 |
|
|