[geeklog-cvs] Auth_Enterprise/Server AEXMLRPCHandler.class.php,1.1,1.2
tony at iowaoutdoors.org
tony at iowaoutdoors.org
Mon Jun 21 00:50:30 EDT 2004
Update of /var/cvs/Auth_Enterprise/Server
In directory www:/tmp/cvs-serv4037
Modified Files:
AEXMLRPCHandler.class.php
Log Message:
Now properly handles exceptions. All exceptions are now throw all the way back to the calling application.
Index: AEXMLRPCHandler.class.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Server/AEXMLRPCHandler.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AEXMLRPCHandler.class.php 19 Jun 2004 20:13:49 -0000 1.1
--- AEXMLRPCHandler.class.php 21 Jun 2004 04:50:27 -0000 1.2
***************
*** 43,46 ****
--- 43,48 ----
public static function handleRequest($params)
{
+ global $xmlrpcerruser;
+
$methodArgumentMapping = array(
'authenticate' => 2,
***************
*** 93,100 ****
$retVal = $serverProvider->$methodToCall($fnParams[2], $fnParams[3], $fnParams[4], $fnParams[5]);
}
} catch (Exception $e) {
! // Something went wrong, send client an exception (i.e. XMLRPC fault)
! return new XML_RPC_Response(XML_RPC_encode(array(AE_XMLRPC_EXCEPTION,$e)));
}
// Because of a PHP5 incompatibility, we must convert any object to arrays before
// encoding them
--- 95,105 ----
$retVal = $serverProvider->$methodToCall($fnParams[2], $fnParams[3], $fnParams[4], $fnParams[5]);
}
+ } catch (AEBaseException $e) {
+ return new XML_RPC_Response(0, $xmlrpcerruser + $e->getXMLErrorOffset(), $e->getMessage());
} catch (Exception $e) {
! // Handle unknown problems
! return new XML_RPC_Response(0, $xmlrpcerruser + 1, $e->getMessage());
}
+
// Because of a PHP5 incompatibility, we must convert any object to arrays before
// encoding them
***************
*** 103,106 ****
--- 108,112 ----
}
+ // Now return the response
return new XML_RPC_Response(XML_RPC_encode($retVal));
More information about the geeklog-cvs
mailing list