Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 2, 2020
2 parents 7887936 + daceb07 commit 4ba4ed8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Expand Up @@ -547,6 +547,9 @@ public static void save(Collection<ObjectDelta<? extends ObjectType>> deltas, Mo

page.getModelService().executeChanges(deltas, options, task, result);
} catch (Exception ex) {
if (ex instanceof CommonException) {
subResult.setUserFriendlyMessage(((CommonException) ex).getUserFriendlyMessage());
}
subResult.recordFatalError(ex.getMessage());
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't save object", ex);
} finally {
Expand Down
Expand Up @@ -345,8 +345,14 @@ protected void submitRegistration(AjaxRequestTarget target) {
LOGGER.trace("Registration for user {} was successfull.", getUserModel().getObject());

} else {
String message;
if (result.getUserFriendlyMessage() != null) {
message = WebModelServiceUtils.translateMessage(result, this);
} else {
message = result.getMessage();
}
getSession().error(
createStringResource("PageSelfRegistration.registration.error", result.getMessage())
createStringResource("PageSelfRegistration.registration.error", message)
.getString());
// removePassword(target);
updateCaptcha(target);
Expand Down

0 comments on commit 4ba4ed8

Please sign in to comment.