Merge branch 'saas-dev' into saas-landing-page
Conflicts: airtime_mvc/application/controllers/ApiController.php airtime_mvc/application/controllers/IndexController.php
This commit is contained in:
commit
060280d5a5
7 changed files with 86 additions and 29 deletions
|
@ -42,3 +42,33 @@ class Application_Common_HTTPHelper
|
|||
return $stationUrl;
|
||||
}
|
||||
}
|
||||
|
||||
class ZendActionHttpException extends Exception {
|
||||
|
||||
private $_action;
|
||||
|
||||
/**
|
||||
* @param Zend_Controller_Action $action
|
||||
* @param int $statusCode
|
||||
* @param string $message
|
||||
* @param int $code
|
||||
* @param Exception $previous
|
||||
*
|
||||
* @throws Zend_Controller_Response_Exception
|
||||
*/
|
||||
public function __construct(Zend_Controller_Action $action, $statusCode, $message,
|
||||
$code = 0, Exception $previous = null) {
|
||||
$this->_action = $action;
|
||||
Logging::info("Error in action " . $action->getRequest()->getActionName()
|
||||
. " with status code $statusCode: $message");
|
||||
$action->getResponse()
|
||||
->setHttpResponseCode($statusCode)
|
||||
->appendBody($message);
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
public function getAction() {
|
||||
return $this->_action;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue