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
27aa85cc
Commit
27aa85cc
authored
Nov 03, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove exception handler. Move to core.
parent
1209ce76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
64 deletions
+1
-64
app/Infrastructure/ExceptionHandler.php
+0
-63
bootstrap/app.php
+1
-1
No files found.
app/Infrastructure/ExceptionHandler.php
deleted
100644 → 0
View file @
1209ce76
<?php
namespace
App\Infrastructure
;
use
Exception
;
use
Psr\Log\LoggerInterface
;
use
Symfony\Component\Debug\ExceptionHandler
as
SymfonyDisplayer
;
use
Illuminate\Contracts\Debug\ExceptionHandler
as
ExceptionHandlerContract
;
class
ExceptionHandler
implements
ExceptionHandlerContract
{
/**
* The log implementation.
*
* @var \Psr\Log\LoggerInterface
*/
protected
$log
;
/**
* Create a new exception handler instance.
*
* @param \Psr\Log\LoggerInterface $log
* @return void
*/
public
function
__construct
(
LoggerInterface
$log
)
{
$this
->
log
=
$log
;
}
/**
* Report or log an exception.
*
* @param \Exception $e
* @return void
*/
public
function
report
(
Exception
$e
)
{
$this
->
log
->
error
((
string
)
$e
);
}
/**
* Render an exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Symfony\Component\HttpFoundation\Response
*/
public
function
render
(
$request
,
Exception
$e
)
{
return
(
new
SymfonyDisplayer
)
->
createResponse
(
$e
);
}
/**
* Render an exception to the console.
*
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @param \Exception $e
* @return void
*/
public
function
renderForConsole
(
$output
,
Exception
$e
)
{
$output
->
writeln
((
string
)
$e
);
}
}
bootstrap/app.php
View file @
27aa85cc
...
...
@@ -38,7 +38,7 @@ $app->singleton(
$app
->
singleton
(
'Illuminate\Contracts\Debug\ExceptionHandler'
,
'
App\Infrastructure
\ExceptionHandler'
'
Illuminate\Foundation\Debug
\ExceptionHandler'
);
/*
...
...
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