public static function appException($e)
{
if (!$e instanceof \Exception) {
$e = new ThrowableError($e);
}
self::getExceptionHandler()->report($e);
if (IS_CLI) {
self::getExceptionHandler()->renderForConsole(new ConsoleOutput(), $e);
} else {
self::getExceptionHandler()->render($e)->send();
}
}