forked from adphi/occweb
returns error message on exception
This commit is contained in:
parent
411e9e800f
commit
4fecde9d9d
@ -58,9 +58,8 @@ class OccController extends Controller
|
|||||||
$this->application->run($input, $this->output);
|
$this->application->run($input, $this->output);
|
||||||
return $this->output->fetch();
|
return $this->output->fetch();
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
exceptionHandler($ex);
|
$this->logger->logException($ex);
|
||||||
} catch (Error $ex) {
|
return "error: " . $ex->getMessage();
|
||||||
exceptionHandler($ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,9 +86,3 @@ class OccController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function exceptionHandler($exception)
|
|
||||||
{
|
|
||||||
echo "An unhandled exception has been thrown:" . PHP_EOL;
|
|
||||||
echo $exception;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user