wol-soft/php-workflow

View on GitHub
src/Exception/WorkflowException.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace PHPWorkflow\Exception;

use Exception;
use PHPWorkflow\State\WorkflowResult;

class WorkflowException extends Exception
{
    private WorkflowResult $workflowResult;

    public function __construct(WorkflowResult $workflowResult, string $message, Exception $previous)
    {
        parent::__construct($message, 0, $previous);
        $this->workflowResult = $workflowResult;
    }

    public function getWorkflowResult(): WorkflowResult
    {
        return $this->workflowResult;
    }
}