From 1a19bc065da5840eb1c848ccad5a5ff9e0e4dc3f Mon Sep 17 00:00:00 2001 From: printempw Date: Sat, 23 Jul 2016 14:10:53 +0800 Subject: [PATCH] fix bug of custom exception renderer --- app/Exceptions/E.php | 4 +++- resources/views/errors/e.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Exceptions/E.php b/app/Exceptions/E.php index 0c8dd8ad..372cb1bc 100644 --- a/app/Exceptions/E.php +++ b/app/Exceptions/E.php @@ -31,7 +31,9 @@ class E extends \Exception private function showErrorPage() { - echo \View::make('errors.e')->with('code', $this->code)->with('message', $this->message); + echo \View::make('errors.e')->with('code', $this->code) + ->with('message', $this->message) + ->render(); exit; } } diff --git a/resources/views/errors/e.tpl b/resources/views/errors/e.tpl index 7340efb1..fbc08583 100644 --- a/resources/views/errors/e.tpl +++ b/resources/views/errors/e.tpl @@ -3,7 +3,7 @@ @section('title', '出现错误') @section('content') -

{{ 出现了一些错误:}}

+

出现了一些错误:

错误码: {{ $code }}

详细信息:{{ $message }}