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\RecorderFailedException::class,
\Tylercd100\LERN\Exceptions\NotifierFailedException::class,
];
* Determine if the exception is in the "do not handle" list.
*
* @param \Exception $e
* @return bool
protected function shouldntHandle(Exception $e){
$dontHandle = array_merge($this->dontHandle,$this->absolutelyDontHandle);
foreach ($dontHandle as $type) {
if ($e instanceof $type) {
return true;
}
return false;