本文整理了Java中org.boon.Exceptions.printStackTrace()
方法的一些代码示例,展示了Exceptions.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Exceptions.printStackTrace()
方法的具体详情如下:
包路径:org.boon.Exceptions
类名称:Exceptions
方法名:printStackTrace
暂无
代码示例来源:origin: boonproject/boon
public void printStackTrace( CharBuf charBuf) {
charBuf.puts("MESSAGE:", this.getMessage());
if (this.getRootCause() !=null) {
charBuf.puts("ROOT CAUSE MESSAGE:", this.getRootCause().getMessage());
} else if (this.getCause()!=null) {
charBuf.puts("CAUSE MESSAGE:", this.getCause().getMessage());
}
StackTraceElement[] stackTrace = this.getFilteredStackTrace();
if (stackTrace.length > 0) {
charBuf.indent(5).addLine("This happens around this area in your code.");
Exceptions.printStackTrace(charBuf, stackTrace);
}
if ( getRootCause() != null ) {
charBuf.addLine().puts("Caused by:", "message:", this.getRootCause().getMessage(), "type", this.getRootCause().getClass().getName());
stackTrace = this.getRootCause().getStackTrace();
Exceptions.printStackTrace(charBuf, stackTrace);
}
charBuf.addLine().multiply('-', 50).addLine().multiply('-', 50).addLine();
StringWriter writer = new StringWriter();
super.printStackTrace( new PrintWriter(writer) );
charBuf.add(writer);
charBuf.addLine().multiply('-', 50).addLine();
}
代码示例来源:origin: boonproject/boon
public void printStackTrace( CharBuf charBuf) {
charBuf.puts("MESSAGE:", this.getMessage());
if (this.getRootCause() !=null) {
charBuf.puts("ROOT CAUSE MESSAGE:", this.getRootCause().getMessage());
} else if (this.getCause()!=null) {
charBuf.puts("CAUSE MESSAGE:", this.getCause().getMessage());
}
StackTraceElement[] stackTrace = this.getFilteredStackTrace();
if (stackTrace.length > 0) {
charBuf.indent(5).addLine("This happens around this area in your code.");
Exceptions.printStackTrace(charBuf, stackTrace);
}
if ( getRootCause() != null ) {
charBuf.addLine().puts("Caused by:", "message:", this.getRootCause().getMessage(), "type", this.getRootCause().getClass().getName());
stackTrace = this.getRootCause().getStackTrace();
Exceptions.printStackTrace(charBuf, stackTrace);
}
charBuf.addLine().multiply('-', 50).addLine().multiply('-', 50).addLine();
StringWriter writer = new StringWriter();
super.printStackTrace( new PrintWriter(writer) );
charBuf.add(writer);
charBuf.addLine().multiply('-', 50).addLine();
}
代码示例来源:origin: io.fastjson/boon
public void printStackTrace( CharBuf charBuf) {
charBuf.puts("MESSAGE:", this.getMessage());
if (this.getRootCause() !=null) {
charBuf.puts("ROOT CAUSE MESSAGE:", this.getRootCause().getMessage());
} else if (this.getCause()!=null) {
charBuf.puts("CAUSE MESSAGE:", this.getCause().getMessage());
}
StackTraceElement[] stackTrace = this.getFilteredStackTrace();
if (stackTrace.length > 0) {
charBuf.indent(5).addLine("This happens around this area in your code.");
Exceptions.printStackTrace(charBuf, stackTrace);
}
if ( getRootCause() != null ) {
charBuf.addLine().puts("Caused by:", "message:", this.getRootCause().getMessage(), "type", this.getRootCause().getClass().getName());
stackTrace = this.getRootCause().getStackTrace();
Exceptions.printStackTrace(charBuf, stackTrace);
}
charBuf.addLine().multiply('-', 50).addLine().multiply('-', 50).addLine();
StringWriter writer = new StringWriter();
super.printStackTrace( new PrintWriter(writer) );
charBuf.add(writer);
charBuf.addLine().multiply('-', 50).addLine();
}
内容来源于网络,如有侵权,请联系作者删除!