aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-12-03 17:57:29 +0000
committerJustin Clark-Casey (justincc)2009-12-03 18:05:42 +0000
commit504bfd87d5a769aaea3f7a8469254b6340487442 (patch)
treea464982a851fe0077e9d08048a2556efa5d16f7e /OpenSim/Framework/Servers
parent* Move code from that last commit to LLClientView since it's a linden client ... (diff)
downloadopensim-SC_OLD-504bfd87d5a769aaea3f7a8469254b6340487442.zip
opensim-SC_OLD-504bfd87d5a769aaea3f7a8469254b6340487442.tar.gz
opensim-SC_OLD-504bfd87d5a769aaea3f7a8469254b6340487442.tar.bz2
opensim-SC_OLD-504bfd87d5a769aaea3f7a8469254b6340487442.tar.xz
if an xml rpc method throws an exception, log as an error to the console as well as returning the exception to the caller
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index bec5ed3..7de5c4c 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -723,13 +723,21 @@ namespace OpenSim.Framework.Servers.HttpServer
723 xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint); 723 xmlRpcResponse = method(xmlRprcRequest, request.RemoteIPEndPoint);
724 } 724 }
725 catch(Exception e) 725 catch(Exception e)
726 { 726 {
727 string errorMessage
728 = String.Format(
729 "Requested method [{0}] from {1} threw exception: {2} {3}",
730 methodName, request.RemoteIPEndPoint.Address, e.Message, e.StackTrace);
731
732 m_log.ErrorFormat("[BASE HTTP SERVER]: {0}", errorMessage);
733
727 // if the registered XmlRpc method threw an exception, we pass a fault-code along 734 // if the registered XmlRpc method threw an exception, we pass a fault-code along
728 xmlRpcResponse = new XmlRpcResponse(); 735 xmlRpcResponse = new XmlRpcResponse();
736
729 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php 737 // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
730 xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}", 738 xmlRpcResponse.SetFault(-32603, errorMessage);
731 methodName, e.Message));
732 } 739 }
740
733 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here 741 // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here
734 response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; 742 response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
735 } 743 }