接口 StackTracePrinter

所有已知实现类:
StandardStackTracePrinter
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface StackTracePrinter
Interface that can be used to print the stack trace of a Throwable.
从以下版本开始:
3.5.0
作者:
Phillip Webb
另请参阅:
  • 方法详细资料

    • printStackTraceToString

      default String printStackTraceToString(Throwable throwable)
      Return a String containing the printed stack trace for a given Throwable.
      参数:
      throwable - the throwable that should have its stack trace printed
      返回:
      the stack trace string
    • printStackTrace

      void printStackTrace(Throwable throwable, Appendable out) throws IOException
      Prints a stack trace for the given Throwable.
      参数:
      throwable - the throwable that should have its stack trace printed
      out - the destination to write output
      抛出:
      IOException - on IO error