]> BookStack Code Mirror - bookstack/blob - app/Exceptions/JsonDebugException.php
Code cleanup, bug squashing
[bookstack] / app / Exceptions / JsonDebugException.php
1 <?php namespace BookStack\Exceptions;
2
3 use Exception;
4
5 class JsonDebugException extends Exception
6 {
7
8     protected $data;
9
10     /**
11      * JsonDebugException constructor.
12      */
13     public function __construct($data)
14     {
15         $this->data = $data;
16     }
17
18     /**
19      * Covert this exception into a response.
20      */
21     public function render()
22     {
23         return response()->json($this->data);
24     }
25 }