List of usage examples for org.apache.commons.lang3.exception ExceptionUtils getRootCauseMessage
public static String getRootCauseMessage(final Throwable th)
From source file:richtercloud.reflection.form.builder.message.Message.java
public Message(Throwable throwable, int type) { this(ExceptionUtils.getRootCauseMessage(throwable), type, throwable.getClass().getSimpleName()); }
From source file:richtercloud.reflection.form.builder.panels.AbstractListPanel.java
private void editRow0() { try {// w ww . j a v a2s. co m editRow(); } catch (FieldHandlingException ex) { messageHandler.handle(new Message( String.format("An exception during editing the row occured: %s", ExceptionUtils.getRootCauseMessage(ex)), JOptionPane.ERROR_MESSAGE, "Exception occured")); } }
From source file:us.fatehi.schemacrawler.webapp.controller.SchemaCrawlerDiagramController.java
@ExceptionHandler(Throwable.class) public String handleException(final Throwable throwable, final RedirectAttributes redirectAttributes) { // See http://www.mkyong.com/spring-boot/spring-boot-file-upload-example/ logger.error(throwable.getMessage(), throwable); final String errorMessage = ExceptionUtils.getRootCauseMessage(throwable); redirectAttributes.addFlashAttribute("errorMessage", errorMessage); return "redirect:error"; }