legacy
[mdref/mdref] / mdref / Exception.php
1 <?php
2
3 namespace mdref;
4
5 use http\Response;
6
7 class Exception extends \Exception
8 {
9 function __construct($code, $message) {
10 parent::__construct($message, $code);
11 }
12
13 function send(Response $res) {
14 $res->setResponseCode($this->code);
15 $res->setBody(new http\Message\Body);
16 $res->getBody()->append($this->message);
17 }
18 }