src/Exception/ContainerException.php
public static function fromPrevious($id, \Exception $prev = null)
    {
        $message = strtr(static::$template, array(
            '{id}'    => (is_string($id) || method_exists($id, '__toString')) ? $id : '?',
            '{error}' => $prev ? get_class($prev) : 'error',
        ));

        if ($prev) {
            $message .= ' Message: ' . $prev->getMessage();
        }

        return new static($message, 0, $prev);
    }
public static function fromPrevious($id, \Exception $prev = null)
    {
        $message = strtr(static::$template, array(
            '{id}'    => (is_string($id) || method_exists($id, '__toString')) ? $id : '?',
            '{error}' => $prev ? get_class($prev) : 'error',
        ));

        if ($prev) {
            $message .= ' Message: ' . $prev->getMessage();
        }

        return new static($message, 0, $prev);
    }
public static function fromPrevious ( $ id , \ Exception $ prev = null ) { $ message = strtr ( static :: $ template , array ( '{id}' => ( is_string ( $ id ) || method_exists ( $ id , '__toString' ) ) ? $ id : '?' , '{error}' => $ prev ? get_class ( $ prev ) : 'error' , ) ) ; if ( $ prev ) { $ message .= ' Message: ' . $ prev -> getMessage ( ) ; } return new static ( $ message , 0 , $ prev ) ; }
Creates a ContainerException by using the information from the previous exception

@param string|mixed $id
@param \Exception $prev

@return ContainerException
Creates a ContainerException by using the information from the previous exception