BaseController exceptions logging
This commit is contained in:
parent
bec380c30d
commit
ce7c86e435
@ -117,11 +117,6 @@ public abstract class BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
protected RelationService relationService;
|
protected RelationService relationService;
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
|
||||||
public void handleException(Exception ex, HttpServletResponse response) {
|
|
||||||
errorResponseHandler.handle(ex, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ExceptionHandler(ThingsboardException.class)
|
@ExceptionHandler(ThingsboardException.class)
|
||||||
public void handleThingsboardException(ThingsboardException ex, HttpServletResponse response) {
|
public void handleThingsboardException(ThingsboardException ex, HttpServletResponse response) {
|
||||||
errorResponseHandler.handle(ex, response);
|
errorResponseHandler.handle(ex, response);
|
||||||
@ -133,7 +128,7 @@ public abstract class BaseController {
|
|||||||
|
|
||||||
private ThingsboardException handleException(Exception exception, boolean logException) {
|
private ThingsboardException handleException(Exception exception, boolean logException) {
|
||||||
if (logException) {
|
if (logException) {
|
||||||
log.error("Error [{}]", exception.getMessage());
|
log.error("Error [{}]", exception.getMessage(), exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
String cause = "";
|
String cause = "";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user