Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
bc36205a
Commit
bc36205a
authored
Feb 14, 2013
by
Kirk Bushell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated error class to pass the Exception for the 500 triggered event.
parent
63bf89ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
routes.php
application/routes.php
+3
-2
error.php
laravel/error.php
+1
-1
No files found.
application/routes.php
View file @
bc36205a
...
@@ -48,7 +48,8 @@ Route::get('/', function()
...
@@ -48,7 +48,8 @@ Route::get('/', function()
|
|
| Similarly, we use an event to handle the display of 500 level errors
| Similarly, we use an event to handle the display of 500 level errors
| within the application. These errors are fired when there is an
| within the application. These errors are fired when there is an
| uncaught exception thrown in the application.
| uncaught exception thrown in the application. The exception object
| that is captured during execution is then passed to the 500 listener.
|
|
*/
*/
...
@@ -57,7 +58,7 @@ Event::listen('404', function()
...
@@ -57,7 +58,7 @@ Event::listen('404', function()
return
Response
::
error
(
'404'
);
return
Response
::
error
(
'404'
);
});
});
Event
::
listen
(
'500'
,
function
()
Event
::
listen
(
'500'
,
function
(
$exception
)
{
{
return
Response
::
error
(
'500'
);
return
Response
::
error
(
'500'
);
});
});
...
...
laravel/error.php
View file @
bc36205a
...
@@ -54,7 +54,7 @@ class Error {
...
@@ -54,7 +54,7 @@ class Error {
// Using events gives the developer more freedom.
// Using events gives the developer more freedom.
else
else
{
{
$response
=
Event
::
first
(
'500'
);
$response
=
Event
::
first
(
'500'
,
$exception
);
$response
=
Response
::
prepare
(
$response
);
$response
=
Response
::
prepare
(
$response
);
}
}
...
...
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