Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
4091be76
Commit
4091be76
authored
Jul 21, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplified some code
parent
34dbfea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/Silex/ExceptionHandler.php
src/Silex/ExceptionHandler.php
+1
-2
No files found.
src/Silex/ExceptionHandler.php
View file @
4091be76
...
@@ -14,7 +14,6 @@ namespace Silex;
...
@@ -14,7 +14,6 @@ namespace Silex;
use
Silex\Application
;
use
Silex\Application
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
;
use
Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
;
use
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
;
use
Symfony\Component\HttpKernel\Debug\ExceptionHandler
as
DebugExceptionHandler
;
use
Symfony\Component\HttpKernel\Debug\ExceptionHandler
as
DebugExceptionHandler
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
...
@@ -37,7 +36,7 @@ class ExceptionHandler implements EventSubscriberInterface
...
@@ -37,7 +36,7 @@ class ExceptionHandler implements EventSubscriberInterface
$response
=
new
Response
(
$handler
->
getErrorMessage
(
$exception
),
$code
);
$response
=
new
Response
(
$handler
->
getErrorMessage
(
$exception
),
$code
);
}
else
{
}
else
{
$title
=
'Whoops, looks like something went wrong.'
;
$title
=
'Whoops, looks like something went wrong.'
;
if
(
$exception
instanceof
NotFoundHttpException
)
{
if
(
404
==
$code
)
{
$title
=
'Sorry, the page you are looking for could not be found.'
;
$title
=
'Sorry, the page you are looking for could not be found.'
;
}
}
...
...
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