Skip to content

Commit

Permalink
add error display page
Browse files Browse the repository at this point in the history
  • Loading branch information
xsir317 committed Nov 29, 2014
1 parent 3ce0397 commit 4daa6bd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions publisher/app/start/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@
App::error(function(Exception $exception, $code)
{
Log::error($exception);
switch ($code)
{
case 401:
case 403:
return Response::view('errors.default', array('msg' => '您没有访问权限'), $code);
case 404:
return Response::view('errors.default', array('msg' => '您要访问的页面不存在'), $code);
case 500:
return Response::view('errors.default', array('msg' => '服务器内部错误,请联系管理员'), $code);
}
});

/*
Expand Down

0 comments on commit 4daa6bd

Please sign in to comment.