public function handle($e)
{
$this->logException($e);
if ($this->isExceptionHalting($e)) {
// if headers are sent, we can't send a response
if (headers_sent()) {
echo $this->buildResponseBody($e);
exit(0);
}
// send it off
$sender = new Http\ResponseSender($this->buildResponse($e));
$sender->send();
if (ob_get_level() > 0) {
ob_flush();
}
exit(self::EXIT_CODE);
}
}