nur-sery/nur_src/b/values/ProxyValueException.php

31 lines
769 B
PHP
Raw Normal View History

2023-12-03 22:10:18 +04:00
<?php
namespace nur\b\values;
use nur\b\UserException;
class ProxyValueException extends UserException {
static function notAnError(): self {
return new self("value is not an error");
}
static function errorNotAllowed(): self {
return new self("value cannot be an error");
}
static function nullNotAllowed(): self {
return new self("value cannot be null");
}
static function undefNotAllowed(): self {
return new self("value cannot be undef");
}
static function undefIsImmutable(): self {
return new self("undef value is immutable");
}
static function nullIsImmutable(): self {
return new self("null value is immutable");
}
static function valueIsImmutable(): self {
return new self("value is immutable");
}
}