标签:tcl turn prefix int i++ lin str 异常 bsp
public String getExceptionStack(Exception e){ StackTraceElement[] stackTraceElements = e.getStackTrace(); String prefix = "Exception in thread "+"\""+Thread.currentThread().getName()+"\" "; String result = prefix+e.toString() + "\n"; int lenth = stackTraceElements.length - 1; for (int i = 0;i<=lenth;i++){ result = result + "\tat "+stackTraceElements[i].getClassName()+"."; result = result + stackTraceElements[i].getMethodName()+"("; result = result + stackTraceElements[i].getFileName()+"."; result = result + stackTraceElements[i].getLineNumber()+")\n"; } return result; }
标签:tcl turn prefix int i++ lin str 异常 bsp
原文地址:https://www.cnblogs.com/scorates/p/11253296.html