Permalink
Browse files

show caused-by info for rethrown exceptions in html mode

  • Loading branch information...
1 parent 23c0753 commit bf40919f261c41d1ead7db8f4bf90d205e1d578a @zeha zeha committed Apr 27, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 infrastructure/framework-src/modules/exceptionutils.js
@@ -54,8 +54,12 @@ function _convertStackFrameToTable(id, frame) {
function getStackTraceHTML(ex) {
ex = _getException(ex);
- if (ex.frames().isEmpty())
- return "No stack trace available.";
+ if (ex.frames().isEmpty()) {
+ var cause = ex.cause();
+ var sw = new java.io.StringWriter();
+ cause.printStackTrace(new java.io.PrintWriter(sw));
+ return sw.toString();
+ }
var out = [];
var counter = 0;
var firstFrame = ex.frames().first();

0 comments on commit bf40919

Please sign in to comment.