类 ExceptionUtils

java.lang.Object
io.agentscope.core.util.ExceptionUtils

public final class ExceptionUtils extends Object
Utility methods for exception handling.
  • 方法详细资料

    • getErrorMessage

      public static String getErrorMessage(Throwable throwable)
      Extracts the most informative error message from an exception.

      This method attempts to retrieve an error message in the following order:

      1. The exception's own message
      2. The cause's message (if the exception message is empty)
      3. 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