/**
* Sends the specified HTTP status immediately.
*
* NOTE: This method only supports web requests and will throw an exception if used with other request types.
*
* @param integer $statusCode The HTTP status code
* @param string $statusMessage A custom HTTP status message
* @param string $content Body content which further explains the status
* @throws UnsupportedRequestTypeException If the request is not a web request
* @throws StopActionException
* @api
*/
protected function throwStatus($statusCode, $statusMessage = null, $content = null)
{
$this->response->setStatus($statusCode, $statusMessage);
if ($content === null) {
$content = $this->response->getStatus();
}
$this->response->setContent($content);
throw new StopActionException();
}