for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tylercd100\LERN\Components;
use Exception;
abstract class Component {
/**
* @var array
*/
protected $dontHandle = [];
private $absolutelyDontHandle = [
Tylercd100\LERN\Exceptions\LERNExceptionInterface::class,
];
* Determine if the exception is in the "do not report" list.
*
* @param \Exception $e
* @return bool
protected function shouldHandle(Exception $e){
return !$this->shouldHandle($e);
}
protected function shouldntHandle(Exception $e){
$dontHandle = array_merge($this->dontHandle,$this->absolutelyDontHandle);
foreach ($dontHandle as $type) {
if ($e instanceof $type) {
return true;
return false;