Fix exception handing.:

This commit is contained in:
Paulo Gustavo Veiga
2012-08-26 17:02:24 -03:00
parent c4f3feb92e
commit 183f472f52
2 changed files with 39 additions and 0 deletions

View File

@@ -63,5 +63,10 @@ public class BaseController {
return new RestErrors(ex.getErrors(), messageSource);
}
@ExceptionHandler(com.wisemapping.exceptions.AccessDeniedSecurityException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public RestErrors handleSecurityErrors(@NotNull ValidationException ex) {
return new RestErrors(ex.getErrors(), messageSource);
}
}