程序包 cn.taketoday.web

类 ResponseStatusException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.core.NestedRuntimeException
cn.taketoday.web.ErrorResponseException
cn.taketoday.web.ResponseStatusException
所有已实现的接口:
HttpStatusCodeProvider, ErrorResponse, Serializable
直接已知子类:
InternalServerException, MethodNotAllowedException, NotAcceptableStatusException, UnsupportedMediaTypeStatusException

public class ResponseStatusException extends ErrorResponseException
Subclass of ErrorResponseException that accepts a "reason" and maps it to the "detail" property of ProblemDetail.
从以下版本开始:
3.0.1
作者:
Rossen Stoyanchev, Juergen Hoeller, TODAY 2021/5/6 19:16
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • reason

      @Nullable private final String reason
  • 构造器详细资料

    • ResponseStatusException

      public ResponseStatusException(HttpStatusCode status)
      Constructor with a response status.
      参数:
      status - the HTTP status (required)
    • ResponseStatusException

      public ResponseStatusException(HttpStatusCode status, @Nullable String reason)
      Constructor with a response status and a reason to add to the exception message as explanation.
      参数:
      status - the HTTP status (required)
      reason - the associated reason (optional)
    • ResponseStatusException

      public ResponseStatusException(int rawStatusCode, @Nullable String reason, @Nullable Throwable cause)
      Constructor with a response status and a reason to add to the exception message as explanation, as well as a nested exception.
      参数:
      rawStatusCode - the HTTP status code value
      reason - the associated reason (optional)
      cause - a nested exception (optional)
    • ResponseStatusException

      public ResponseStatusException(HttpStatusCode status, @Nullable String reason, @Nullable Throwable cause)
      Constructor with a response status and a reason to add to the exception message as explanation, as well as a nested exception.
      参数:
      status - the HTTP status (required)
      reason - the associated reason (optional)
      cause - a nested exception (optional)
  • 方法详细资料