. * * @package OMB * @author Adrian Lang * @copyright 2009 Adrian Lang * @license http://www.gnu.org/licenses/agpl.html GNU AGPL 3.0 **/ class OMB_RemoteServiceException extends Exception { public static function fromYadis($request_uri, $result) { if ($result->status == 200) { $err = 'Got wrong response ' . $result->body; } else { $err = 'Got error code ' . $result->status . ' with response ' . $result->body; } return new OMB_RemoteServiceException($request_uri . ': ' . $err); } public static function forRequest($action_uri, $failure) { return new OMB_RemoteServiceException("Handler for $action_uri: " . $failure); } } ?>