Add debung info for exceptions....

This commit is contained in:
Paulo Gustavo Veiga 2013-03-29 22:44:13 -03:00
parent 8e66c97aa3
commit f5b4cc9ea7
2 changed files with 12 additions and 11 deletions

View File

@ -60,16 +60,6 @@ public class BaseController {
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)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody
@ -110,4 +100,16 @@ public class BaseController {
final Locale locale = LocaleContextHolder.getLocale();
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);
}
}

View File

@ -19,7 +19,6 @@
package com.wisemapping.webmvc;
import com.wisemapping.exceptions.AccessDeniedSecurityException;
import com.wisemapping.exceptions.MapCouldNotFoundException;
import com.wisemapping.exceptions.WiseMappingException;
import com.wisemapping.model.CollaborationRole;