Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix report method for ViewException
  • Loading branch information
driesvints committed Feb 1, 2021
commit 8f0c2953a0553e6c451f0f2df7a4337716bf9fc6
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DummyClass extends Exception
/**
* Report the exception.
*
* @return void
* @return bool|null
*/
public function report()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DummyClass extends Exception
/**
* Report the exception.
*
* @return void
* @return bool|null
*/
public function report()
{
Expand Down
8 changes: 5 additions & 3 deletions src/Illuminate/View/ViewException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
namespace Illuminate\View;

use ErrorException;
use Illuminate\Container\Container;
use Illuminate\Support\Reflector;

class ViewException extends ErrorException
{
/**
* Report the exception.
*
* @return void
* @return bool|null
*/
public function report()
{
$exception = $this->getPrevious();

if ($exception && method_exists($exception, 'report')) {
$exception->report();
if (Reflector::isCallable($reportCallable = [$exception, 'report'])) {
return Container::getInstance()->call($reportCallable);
}
}

Expand Down