public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getStackTrace(int maxDepth)
Returns the current stack trace.
|
static String |
throwableToString(Throwable t)
Returns the stacktrace of the throwable as string.
|
static String |
throwableToString(Throwable t,
int maxLines)
Returns the stacktrace of the throwable as string.
|
public static String throwableToString(Throwable t)
t - the throwable to get the stacktrace forpublic static String throwableToString(Throwable t, int maxLines)
t - the throwable to get the stacktrace formaxLines - the maximum number of lines to print, <= 0 for allpublic static String getStackTrace(int maxDepth)
maxDepth - the maximum depth of the stack trace, <= 0 for full traceCopyright © 2022. All rights reserved.