public abstract class ExceptionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Throwable |
getDeepestCause(Throwable exception)
가장 안쪽의 cause를 리턴한다.
|
static Throwable |
getExceptionInCause(Class expClass,
Throwable sourceExp)
Excpetion 객체의 모든 cause를 검사하여 해당 타입의 Throwable객체만 return 한다.
|
static boolean |
isIncludeCause(Class expClass,
Throwable sourceExp)
Excpetion cause 중에서 해당 Excpetion 종류가 있는지 검사한다.
|
static String |
stackTraceToString(Throwable e)
Excpetion 객체를 toString함수를 이용해서 출력하면 맨 윗줄만 출력된다.
|
public static Throwable getDeepestCause(Throwable exception)
exception
- 조회할 exceptionpublic static Throwable getExceptionInCause(Class expClass, Throwable sourceExp)
expClass
- 뽑아낼 타입의 Throwable클래스sourceExp
- 검사할 Excpetion 객체public static boolean isIncludeCause(Class expClass, Throwable sourceExp)
expClass
- 검사할 종류의 Excpetion classsourceExp
- 검사할 ExcpetionCopyright © 2025. All rights reserved.