You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
299B

  1. <?php
  2. namespace App\Exceptions;
  3. use Exception;
  4. class ParamException extends Exception
  5. {
  6. public string $target;
  7. public static function throw(string $target, $message)
  8. {
  9. $exception = new static($message);
  10. $exception->target = $target;
  11. throw $exception;
  12. }
  13. }