From 9ed0a8dbad121b64ca8baca78f28ca58602c47ca Mon Sep 17 00:00:00 2001
From: MW
Date: Wed, 25 Apr 2007 18:12:06 +0000
Subject: 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.
---
XmlRpcCS/XmlRpcException.cs | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 XmlRpcCS/XmlRpcException.cs
(limited to 'XmlRpcCS/XmlRpcException.cs')
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 @@
+namespace Nwc.XmlRpc
+{
+ using System;
+
+ /// An XML-RPC Exception.
+ /// Maps a C# exception to an XML-RPC fault. Normal exceptions
+ /// include a message so this adds the code needed by XML-RPC.
+ public class XmlRpcException : Exception
+ {
+ private int _code;
+
+ /// Instantiate an XmlRpcException with a code and message.
+ /// Int faultCode associated with this exception.
+ /// String faultMessage associated with this exception.
+ public XmlRpcException(int code, String message)
+ : base(message)
+ {
+ _code = code;
+ }
+
+ /// The value of the faults message, i.e. the faultString.
+ public String FaultString
+ {
+ get { return Message; }
+ }
+
+ /// The value of the faults code, i.e. the faultCode.
+ public int FaultCode
+ {
+ get { return _code; }
+ }
+
+ /// Format the message to include the code.
+ override public String ToString()
+ {
+ return "Code: " + FaultCode + " Message: " + base.ToString();
+ }
+ }
+}
--
cgit v1.1