类 NestedExceptionUtils
- java.lang.Object
-
- com.alibaba.nacos.common.packagescan.util.NestedExceptionUtils
-
public abstract class NestedExceptionUtils extends java.lang.ObjectCopy from https://github.com/spring-projects/spring-framework.git, with less modifications Helper class for implementing exception classes which are capable of holding nested exceptions. Necessary because we can't share a base class among different exception types.Mainly for use within the framework.
- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
NestedIoException
-
-
构造器概要
构造器 构造器 说明 NestedExceptionUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.lang.StringbuildMessage(java.lang.String message, java.lang.Throwable cause)Build a message for the given base message and root cause.static java.lang.ThrowablegetMostSpecificCause(java.lang.Throwable original)Retrieve the most specific cause of the given exception, that is, either the innermost cause (root cause) or the exception itself.static java.lang.ThrowablegetRootCause(java.lang.Throwable original)Retrieve the innermost cause of the given exception, if any.
-
-
-
方法详细资料
-
buildMessage
public static java.lang.String buildMessage(java.lang.String message, java.lang.Throwable cause)Build a message for the given base message and root cause.- 参数:
message- the base messagecause- the root cause- 返回:
- the full exception message
-
getRootCause
public static java.lang.Throwable getRootCause(java.lang.Throwable original)
Retrieve the innermost cause of the given exception, if any.- 参数:
original- the original exception to introspect- 返回:
- the innermost exception, or
nullif none - 从以下版本开始:
- 4.3.9
-
getMostSpecificCause
public static java.lang.Throwable getMostSpecificCause(java.lang.Throwable original)
Retrieve the most specific cause of the given exception, that is, either the innermost cause (root cause) or the exception itself.Differs from
getRootCause(java.lang.Throwable)in that it falls back to the original exception if there is no root cause.- 参数:
original- the original exception to introspect- 返回:
- the most specific cause (never
null) - 从以下版本开始:
- 4.3.9
-
-