diff options
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 871ea57..98b44db 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -586,7 +586,18 @@ namespace OpenSim.Framework.Servers | |||
586 | XmlRpcMethod method; | 586 | XmlRpcMethod method; |
587 | if (m_rpcHandlers.TryGetValue(methodName, out method)) | 587 | if (m_rpcHandlers.TryGetValue(methodName, out method)) |
588 | { | 588 | { |
589 | xmlRpcResponse = method(xmlRprcRequest); | 589 | try |
590 | { | ||
591 | xmlRpcResponse = method(xmlRprcRequest); | ||
592 | } | ||
593 | catch(Exception e) | ||
594 | { | ||
595 | // if the registered XmlRpc method threw an exception, we pass a fault-code along | ||
596 | xmlRpcResponse = new XmlRpcResponse(); | ||
597 | // Code probably set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php | ||
598 | xmlRpcResponse.SetFault(-32603, String.Format("Requested method [{0}] threw exception: {1}", | ||
599 | methodName, e.Message)); | ||
600 | } | ||
590 | // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here | 601 | // if the method wasn't found, we can't determine KeepAlive state anyway, so lets do it only here |
591 | response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; | 602 | response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; |
592 | } | 603 | } |