|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2012 the original author or authors. |
|
|
|
* Copyright 2002-2016 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -25,8 +25,8 @@ import org.springframework.http.HttpStatus; |
|
|
|
* Exception thrown when an HTTP 5xx is received. |
|
|
|
* Exception thrown when an HTTP 5xx is received. |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Arjen Poutsma |
|
|
|
* @author Arjen Poutsma |
|
|
|
* @see DefaultResponseErrorHandler |
|
|
|
|
|
|
|
* @since 3.0 |
|
|
|
* @since 3.0 |
|
|
|
|
|
|
|
* @see DefaultResponseErrorHandler |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class HttpServerErrorException extends HttpStatusCodeException { |
|
|
|
public class HttpServerErrorException extends HttpStatusCodeException { |
|
|
|
|
|
|
|
|
|
|
|
@ -34,8 +34,8 @@ public class HttpServerErrorException extends HttpStatusCodeException { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on an |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on |
|
|
|
* {@link HttpStatus}. |
|
|
|
* an {@link HttpStatus}. |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusCode the status code |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public HttpServerErrorException(HttpStatus statusCode) { |
|
|
|
public HttpServerErrorException(HttpStatus statusCode) { |
|
|
|
@ -43,8 +43,8 @@ public class HttpServerErrorException extends HttpStatusCodeException { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on an |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on |
|
|
|
* {@link HttpStatus} and status text. |
|
|
|
* an {@link HttpStatus} and status text. |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusText the status text |
|
|
|
* @param statusText the status text |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -53,31 +53,34 @@ public class HttpServerErrorException extends HttpStatusCodeException { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on an |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on |
|
|
|
* {@link HttpStatus}, status text, and response body content. |
|
|
|
* an {@link HttpStatus}, status text, and response body content. |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusText the status text |
|
|
|
* @param statusText the status text |
|
|
|
* @param responseBody the response body content, may be {@code null} |
|
|
|
* @param responseBody the response body content (may be {@code null}) |
|
|
|
* @param responseCharset the response body charset, may be {@code null} |
|
|
|
* @param responseCharset the response body charset (may be {@code null}) |
|
|
|
* @since 3.0.5 |
|
|
|
* @since 3.0.5 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public HttpServerErrorException(HttpStatus statusCode, String statusText, |
|
|
|
public HttpServerErrorException(HttpStatus statusCode, String statusText, |
|
|
|
byte[] responseBody, Charset responseCharset) { |
|
|
|
byte[] responseBody, Charset responseCharset) { |
|
|
|
|
|
|
|
|
|
|
|
super(statusCode, statusText, responseBody, responseCharset); |
|
|
|
super(statusCode, statusText, responseBody, responseCharset); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on a |
|
|
|
* Construct a new instance of {@code HttpServerErrorException} based on |
|
|
|
* {@link HttpStatus}, status text, and response body content. |
|
|
|
* an {@link HttpStatus}, status text, and response body content. |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusCode the status code |
|
|
|
* @param statusText the status text |
|
|
|
* @param statusText the status text |
|
|
|
* @param responseHeaders the response headers, may be {@code null} |
|
|
|
* @param responseHeaders the response headers (may be {@code null}) |
|
|
|
* @param responseBody the response body content, may be {@code null} |
|
|
|
* @param responseBody the response body content (may be {@code null}) |
|
|
|
* @param responseCharset the response body charset, may be {@code null} |
|
|
|
* @param responseCharset the response body charset (may be {@code null}) |
|
|
|
* @since 3.1.2 |
|
|
|
* @since 3.1.2 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public HttpServerErrorException(HttpStatus statusCode, String statusText, |
|
|
|
public HttpServerErrorException(HttpStatus statusCode, String statusText, |
|
|
|
HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) { |
|
|
|
HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset) { |
|
|
|
|
|
|
|
|
|
|
|
super(statusCode, statusText, responseHeaders, responseBody, responseCharset); |
|
|
|
super(statusCode, statusText, responseHeaders, responseBody, responseCharset); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|