mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 07:27:56 +01:00
Add debung info for exceptions....
This commit is contained in:
parent
8e66c97aa3
commit
f5b4cc9ea7
@ -60,16 +60,6 @@ public class BaseController {
|
|||||||
return new RestErrors(ex.getMessage(),Severity.WARNING);
|
return new RestErrors(ex.getMessage(),Severity.WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
|
||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
|
||||||
@ResponseBody
|
|
||||||
public RestErrors handleServerErrors(@NotNull Exception ex, @NotNull HttpServletRequest request) {
|
|
||||||
final User user = Utils.getUser();
|
|
||||||
notificationService.reportJavaException(ex, user, request);
|
|
||||||
return new RestErrors(ex.getMessage(),Severity.SEVERE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ExceptionHandler(ImportUnexpectedException.class)
|
@ExceptionHandler(ImportUnexpectedException.class)
|
||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@ -110,4 +100,16 @@ public class BaseController {
|
|||||||
final Locale locale = LocaleContextHolder.getLocale();
|
final Locale locale = LocaleContextHolder.getLocale();
|
||||||
return new RestErrors(ex.getMessage(messageSource, locale),ex.getSeverity(),ex.getTechInfo());
|
return new RestErrors(ex.getMessage(messageSource, locale),ex.getSeverity(),ex.getTechInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(Exception.class)
|
||||||
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
|
@ResponseBody
|
||||||
|
public RestErrors handleServerErrors(@NotNull Exception ex, @NotNull HttpServletRequest request) {
|
||||||
|
final User user = Utils.getUser(false);
|
||||||
|
notificationService.reportJavaException(ex, user, request);
|
||||||
|
ex.printStackTrace();
|
||||||
|
return new RestErrors(ex.getMessage(),Severity.SEVERE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package com.wisemapping.webmvc;
|
package com.wisemapping.webmvc;
|
||||||
|
|
||||||
|
|
||||||
import com.wisemapping.exceptions.AccessDeniedSecurityException;
|
|
||||||
import com.wisemapping.exceptions.MapCouldNotFoundException;
|
import com.wisemapping.exceptions.MapCouldNotFoundException;
|
||||||
import com.wisemapping.exceptions.WiseMappingException;
|
import com.wisemapping.exceptions.WiseMappingException;
|
||||||
import com.wisemapping.model.CollaborationRole;
|
import com.wisemapping.model.CollaborationRole;
|
||||||
|
Loading…
Reference in New Issue
Block a user