+ // Handle pretty exceptions which will show a friendly application-fitting page
+ // Which will include the basic message to point the user roughly to the cause.
+ if (($e instanceof PrettyException || $e->getPrevious() instanceof PrettyException) && !config('app.debug')) {
+ $message = ($e instanceof PrettyException) ? $e->getMessage() : $e->getPrevious()->getMessage();
+ return response()->view('errors/500', ['message' => $message], 500);
+ }
+