Timeout exceptions as RuntimeExceptions
Issue: SPR-14669
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 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.
|
||||||
@@ -23,7 +23,7 @@ package org.springframework.messaging.simp.stomp;
|
|||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class ConnectionLostException extends Exception {
|
public class ConnectionLostException extends RuntimeException {
|
||||||
|
|
||||||
public ConnectionLostException(String message) {
|
public ConnectionLostException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.web.context.request.async;
|
package org.springframework.web.context.request.async;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,6 +30,6 @@ package org.springframework.web.context.request.async;
|
|||||||
* @since 4.2.8
|
* @since 4.2.8
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class AsyncRequestTimeoutException extends Exception {
|
public class AsyncRequestTimeoutException extends RuntimeException {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,9 @@ public abstract class ResponseEntityExceptionHandler {
|
|||||||
(AsyncRequestTimeoutException) ex, headers, status, request);
|
(AsyncRequestTimeoutException) ex, headers, status, request);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.warn("Unknown exception type: " + ex.getClass().getName());
|
if (logger.isWarnEnabled()) {
|
||||||
|
logger.warn("Unknown exception type: " + ex.getClass().getName());
|
||||||
|
}
|
||||||
HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
|
HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
|
||||||
return handleExceptionInternal(ex, null, headers, status, request);
|
return handleExceptionInternal(ex, null, headers, status, request);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user