Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- vscode
- resource
- plugin
- maVen
- 단축키
- grep
- 줄바꿈 문자
- ssh
- tomcat
- Source
- Eclipse
- xargs
- VirtualBox
- Windows 10
- 네트워크
- port
- Quartz
- Windows
- profile
- context
- JavaScript
- lsof
- find
- bash
- IntelliJ
- netsh
- import
- GIT
- Mac
- web.xml
Archives
- Today
- Total
develog
[Java] getRootCause 본문
public Throwable getRootCause(Throwable e) {
if (e == null) return null;
Throwable t = e;
Throwable prevT = t;
while (true) {
t = t.getCause();
if (t == null) break;
prevT = t;
}
return prevT;
}
public String getRootCauseMsg(Throwable e) {
Throwable t = getRootCause(e);
if (t == null) return null;
return t.getMessage();
}
'Dev > Java' 카테고리의 다른 글
[Maven] Eclipse, Maven, Dynamic Web Project (0) | 2014.12.21 |
---|---|
[Java] JNI (0) | 2014.12.03 |
[Java] 음력, icu4j (0) | 2014.11.19 |
[Java] 음력 (0) | 2014.11.19 |
[Java] List inline add (0) | 2014.11.19 |
Comments