1 <?php namespace BookStack\Exceptions;
4 use Illuminate\Contracts\Support\Responsable;
6 class PrettyException extends Exception implements Responsable
11 protected $subtitle = null;
16 protected $details = null;
19 * Render a response for when this exception occurs.
22 public function toResponse($request)
24 $code = ($this->getCode() === 0) ? 500 : $this->getCode();
25 return response()->view('errors.' . $code, [
26 'message' => $this->getMessage(),
27 'subtitle' => $this->subtitle,
28 'details' => $this->details,
32 public function setSubtitle(string $subtitle): self
34 $this->subtitle = $subtitle;
38 public function setDetails(string $details): self
40 $this->details = $details;