<?php
/**
 * CoreBootException class.
 *
 * Exception thrown when a Firevert plugin fails to boot.
 *
 * @package Ilabs\Firevert\Core\Exceptions
 */

// phpcs:disable

declare( strict_types=1 );

namespace Ilabs\Firevert\Core\Exceptions;

use RuntimeException;
use Throwable;

/**
 * Exception thrown when a module fails to boot.
 */
class CoreBootException extends RuntimeException {

	/**
	 * Constructor.
	 *
	 * @param string         $message Exception message.
	 * @param int            $code Exception code.
	 * @param Throwable|null $previous Previous exception.
	 */
	public function __construct(
		string $message = 'Reason not found',
		int $code = 500,
		Throwable $previous = null
	) {
		parent::__construct( 'Firevert core failed to boot. Reason: ' . $message, $code, $previous );
	}
}
