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.

17 lines
420 B

5 years ago
  1. <?php
  2. namespace App\Exception;
  3. use App\Constants\ErrorCode;
  4. use Hyperf\Server\Exception\ServerException;
  5. class SsdbException extends ServerException
  6. {
  7. public function __construct(int $code = 0, string $message = null, Throwable $previous = null)
  8. {
  9. if (is_null($message)) {
  10. $message = ErrorCode::getMessage($code);
  11. }
  12. parent::__construct($message, $code, $previous);
  13. }
  14. }