src/Exception/LeavingContextFailed.php
public static function inContext(Context $context, $code = 0, Throwable $previous = null): self
    {
        return new static(
            sprintf('Leaving context "%s" failed. Context stack is empty', $context->__toString()),
            $code,
            $previous
        );
    }
public static function inContext(Context $context, $code = 0, Throwable $previous = null): self
    {
        return new static(
            sprintf('Leaving context "%s" failed. Context stack is empty', $context->__toString()),
            $code,
            $previous
        );
    }
Create exception for the current context.

@param Context        $context  Current context.
@param int            $code     Error code.
@param Throwable|null $previous Previous exception.

@return static