aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/XmlRpcCS/XmlRpcException.cs
diff options
context:
space:
mode:
authorMW2007-04-25 18:12:06 +0000
committerMW2007-04-25 18:12:06 +0000
commit9ed0a8dbad121b64ca8baca78f28ca58602c47ca (patch)
tree5c0008e0be59cb7ccaaf8ff1b0ea2f272a0548e6 /XmlRpcCS/XmlRpcException.cs
parentCan now use the xml config file for setting up things like sandbox mode, logi... (diff)
downloadopensim-SC-9ed0a8dbad121b64ca8baca78f28ca58602c47ca.zip
opensim-SC-9ed0a8dbad121b64ca8baca78f28ca58602c47ca.tar.gz
opensim-SC-9ed0a8dbad121b64ca8baca78f28ca58602c47ca.tar.bz2
opensim-SC-9ed0a8dbad121b64ca8baca78f28ca58602c47ca.tar.xz
updated to use lastest version of libsl but is currently broke when using SL viewer 1.15.02, due to big changes in the message templates.
Diffstat (limited to 'XmlRpcCS/XmlRpcException.cs')
-rw-r--r--XmlRpcCS/XmlRpcException.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/XmlRpcCS/XmlRpcException.cs b/XmlRpcCS/XmlRpcException.cs
new file mode 100644
index 0000000..fd1f4ae
--- /dev/null
+++ b/XmlRpcCS/XmlRpcException.cs
@@ -0,0 +1,39 @@
1namespace Nwc.XmlRpc
2{
3 using System;
4
5 /// <summary>An XML-RPC Exception.</summary>
6 /// <remarks>Maps a C# exception to an XML-RPC fault. Normal exceptions
7 /// include a message so this adds the code needed by XML-RPC.</remarks>
8 public class XmlRpcException : Exception
9 {
10 private int _code;
11
12 /// <summary>Instantiate an <c>XmlRpcException</c> with a code and message.</summary>
13 /// <param name="code"><c>Int</c> faultCode associated with this exception.</param>
14 /// <param name="message"><c>String</c> faultMessage associated with this exception.</param>
15 public XmlRpcException(int code, String message)
16 : base(message)
17 {
18 _code = code;
19 }
20
21 /// <summary>The value of the faults message, i.e. the faultString.</summary>
22 public String FaultString
23 {
24 get { return Message; }
25 }
26
27 /// <summary>The value of the faults code, i.e. the faultCode.</summary>
28 public int FaultCode
29 {
30 get { return _code; }
31 }
32
33 /// <summary>Format the message to include the code.</summary>
34 override public String ToString()
35 {
36 return "Code: " + FaultCode + " Message: " + base.ToString();
37 }
38 }
39}