mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
26 lines
567 B
PHP
26 lines
567 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\exception;
|
|
|
|
/**
|
|
* EnvironmentException is thrown when there is an issue with the environment setup,
|
|
* such as missing dependencies or incorrect configurations.
|
|
*/
|
|
class EnvironmentException extends SPCException
|
|
{
|
|
public function __construct(string $message, private readonly ?string $solution = null)
|
|
{
|
|
parent::__construct($message);
|
|
}
|
|
|
|
/**
|
|
* Returns the solution for the environment issue.
|
|
*/
|
|
public function getSolution(): ?string
|
|
{
|
|
return $this->solution;
|
|
}
|
|
}
|