Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
109a7b4b
Commit
109a7b4b
authored
Jul 18, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring Error class.
parent
ce20d7b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
system/error.php
+4
-5
No files found.
system/error.php
View file @
109a7b4b
...
...
@@ -45,7 +45,7 @@ class Error {
call_user_func
(
Config
::
get
(
'error.logger'
),
$severity
,
$message
.
' in '
.
$e
->
getFile
()
.
' on line '
.
$e
->
getLine
());
}
static
::
show
(
$e
,
$severity
,
$message
,
$e
->
getFile
()
);
static
::
show
(
$e
,
$severity
,
$message
);
exit
(
1
);
}
...
...
@@ -56,20 +56,19 @@ class Error {
* @param Exception $e
* @param string $severity
* @param string $message
* @param string $file
* @return void
*/
private
static
function
show
(
$e
,
$severity
,
$message
,
$file
)
private
static
function
show
(
$e
,
$severity
,
$message
)
{
if
(
Config
::
get
(
'error.detail'
))
{
$view
=
View
::
make
(
'exception'
)
->
bind
(
'severity'
,
$severity
)
->
bind
(
'message'
,
$message
)
->
bind
(
'file'
,
$
file
)
->
bind
(
'file'
,
$
e
->
getFile
()
)
->
bind
(
'line'
,
$e
->
getLine
())
->
bind
(
'trace'
,
$e
->
getTraceAsString
())
->
bind
(
'contexts'
,
static
::
context
(
$
file
,
$e
->
getLine
()));
->
bind
(
'contexts'
,
static
::
context
(
$
e
->
getFile
()
,
$e
->
getLine
()));
Response
::
make
(
$view
,
500
)
->
send
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment