Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

UploadException.php 513B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace crmeb\exceptions;
  3. use Throwable;
  4. /**
  5. * Class AuthException
  6. */
  7. class UploadException extends \RuntimeException
  8. {
  9. public function __construct($message = "", $code = 0, Throwable $previous = null)
  10. {
  11. if (is_array($message)) {
  12. $errInfo = $message;
  13. $message = $errInfo[1] ?? '未知错误';
  14. if ($code === 0) {
  15. $code = $errInfo[0] ?? 400;
  16. }
  17. }
  18. parent::__construct($message, $code, $previous);
  19. }
  20. }