[geeklog-cvs] Auth_Enterprise/Server AEXMLRPCHandler.class.php,1.2,1.3
tony at iowaoutdoors.org
tony at iowaoutdoors.org
Thu Jul 1 14:45:44 EDT 2004
Update of /var/cvs/Auth_Enterprise/Server
In directory www:/tmp/cvs-serv20982
Modified Files:
AEXMLRPCHandler.class.php
Log Message:
methodArgumentMapping had a typo and added a default case to the switch statemetn so we can more elegantly catch errors when an invalid method is given
Index: AEXMLRPCHandler.class.php
===================================================================
RCS file: /var/cvs/Auth_Enterprise/Server/AEXMLRPCHandler.class.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AEXMLRPCHandler.class.php 21 Jun 2004 04:50:27 -0000 1.2
--- AEXMLRPCHandler.class.php 1 Jul 2004 18:45:42 -0000 1.3
***************
*** 49,53 ****
'createAccountByAdmin' => 4,
'changePassword' => 2,
! 'chnagePasswordByAdmin' =>4,
'resetPassword' => 1,
'getUserPrivilegesByAdmin' => 3,
--- 49,53 ----
'createAccountByAdmin' => 4,
'changePassword' => 2,
! 'changePasswordByAdmin' => 4,
'resetPassword' => 1,
'getUserPrivilegesByAdmin' => 3,
***************
*** 73,78 ****
try {
$serverProvider = AEServerProviderFactory::getProvider($appId);
} catch (Exception $e) {
! return new XML_RPC_Response(XML_RPC_encode(array(AE_XMLRPC_EXCEPTION,$e)));
}
--- 73,80 ----
try {
$serverProvider = AEServerProviderFactory::getProvider($appId);
+ } catch (AEBaseException $e) {
+ return new XML_RPC_Response(0, $xmlrpcerruser + $e->getXMLErrorOffset(), $e->getMessage());
} catch (Exception $e) {
! return new XML_RPC_Response(0, $xmlrpcerruser + 1, $e->getMessage());
}
***************
*** 94,97 ****
--- 96,102 ----
case 4:
$retVal = $serverProvider->$methodToCall($fnParams[2], $fnParams[3], $fnParams[4], $fnParams[5]);
+ break;
+ default:
+ throw new Exception("Method $methodTOCall not defined in methodArgumentMapping");
}
} catch (AEBaseException $e) {
More information about the geeklog-cvs
mailing list