2017-05-21から1日間の記事一覧

Exception の root の取得

Exception の root の取得で良い方法はないのか。。。 }catch(Exception e){ Optional<Throwable> rootCause = Stream.iterate(e, Throwable::getCause).filter(t->t.getCause()==null).findFirst(); String errormessage = rootCause.get().getMessage();</throwable>