3 namespace BookStack\Exceptions;
5 use BookStack\App\AppVersion;
6 use Illuminate\Contracts\Foundation\ExceptionRenderer;
8 class BookStackExceptionHandlerPage implements ExceptionRenderer
10 public function render($throwable)
12 return view('errors.debug', [
13 'error' => $throwable->getMessage(),
14 'errorClass' => get_class($throwable),
15 'trace' => $throwable->getTraceAsString(),
16 'environment' => $this->getEnvironment(),
20 protected function safeReturn(callable $callback, $default = null)
24 } catch (\Exception $e) {
29 protected function getEnvironment(): array
32 'PHP Version' => phpversion(),
33 'BookStack Version' => $this->safeReturn(function () {
34 return AppVersion::get();
36 'Theme Configured' => $this->safeReturn(function () {
37 return config('view.theme');