StackTrace MUtil Improvements

This commit is contained in:
Olof Larsson 2016-01-30 20:14:40 +01:00
parent dda1a3cb95
commit d80a0f4865

View File

@ -432,10 +432,28 @@ public class MUtil
return ret; return ret;
} }
public static List<String> getStackTraceStrings(int skip, boolean color)
public static String getStackTraceString(List<StackTraceElement> stackTrace, boolean color, String glue)
{ {
return Txt.implode(getStackTraceStrings(stackTrace, color), glue); skip++;
return getStackTraceStrings(getStackTrace(skip), color);
}
public static List<String> getStackTraceStrings(boolean color)
{
return getStackTraceStrings(0, color);
}
public static String getStackTraceString(List<StackTraceElement> stackTrace, boolean color)
{
return Txt.implode(getStackTraceStrings(stackTrace, color), "\n");
}
public static String getStackTraceString(int skip, boolean color)
{
skip++;
return getStackTraceString(getStackTrace(skip), color);
}
public static String getStackTraceString(boolean color)
{
return getStackTraceString(0, color);
} }
// -------------------------------------------- // // -------------------------------------------- //