类 ExceptionUtils
java.lang.Object
io.agentscope.core.util.ExceptionUtils
Utility methods for exception handling.
-
方法概要
修饰符和类型方法说明static StringgetErrorMessage(Throwable throwable) Extracts the most informative error message from an exception.
-
方法详细资料
-
getErrorMessage
Extracts the most informative error message from an exception.This method attempts to retrieve an error message in the following order:
- The exception's own message
- The cause's message (if the exception message is empty)
- The exception's simple class name (as a fallback)
- 参数:
throwable- The exception to extract the message from (may be null)- 返回:
- A non-null error message string
-