src/Exceptions/ConvertsExceptions.php
protected function convert(Exception $exception, array $convert)
    {
        foreach ($convert as $source => $target) {
            if ($exception instanceof $source) {
                if (is_callable($target)) {
                    $target($exception);
                }

                throw new $target;
            }
        }
    }
protected function convert(Exception $exception, array $convert)
    {
        foreach ($convert as $source => $target) {
            if ($exception instanceof $source) {
                if (is_callable($target)) {
                    $target($exception);
                }

                throw new $target;
            }
        }
    }
Convert an exception to another exception

@param  \Exception $exception
@param  array      $convert
@return void