<?php

namespace MediaWiki\Extension\CustomQueryPage\Store;

use RuntimeException;

class RoutineCloneException extends RuntimeException {
    private string $messageKey;
    /** @var mixed[] */
    private array $messageParams;

    /**
     * @param string $messageKey
     * @param mixed[] $messageParams
     */
    public function __construct( string $messageKey, array $messageParams = [], ?\Throwable $previous = null ) {
        parent::__construct( $messageKey, 0, $previous );
        $this->messageKey = $messageKey;
        $this->messageParams = $messageParams;
    }

    public function getMessageKey(): string {
        return $this->messageKey;
    }

    /**
     * @return mixed[]
     */
    public function getMessageParams(): array {
        return $this->messageParams;
    }
}
