List of usage examples for org.springframework.dao DataAccessException getLocalizedMessage
public String getLocalizedMessage()
From source file:org.uhp.portlets.news.service.TopicManagerImpl.java
@Transactional(propagation = Propagation.REQUIRED) public void addTopic(Topic topic) { this.saveTopic(topic); List<UserRole> userRoles; try {//from ww w . j a v a 2s.co m userRoles = this.userDao.getUsersRolesForCtx(topic.getCategoryId(), NewsConstants.CTX_C); for (UserRole ur : userRoles) { if (!"ROLE_USER".equals(ur.getRole())) { this.userDao.addUserRole(ur.getPrincipal(), ur.getRole(), NewsConstants.CTX_T, topic.getTopicId(), ur.getIsGroup()); } } } catch (DataAccessException e) { LOGGER.error("addTopic : " + e.getLocalizedMessage()); } }