Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: runtime/vm/exceptions.cc

Issue 12316116: Add functionality to get full stack trace when exceptions are thrown. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 19105)
+++ runtime/vm/exceptions.cc (working copy)
@@ -310,9 +310,21 @@
} else {
stacktrace ^= existing_stacktrace.raw();
stacktrace.Append(func_array, code_array, pc_offset_array);
+ // Since we are re throwing and appending to the existing stack trace
+ // we clear out the catch trace collected in the existing stack trace
+ // as that trace will not be valid anymore.
+ stacktrace.SetCatchStacktrace(Object::empty_array(),
+ Object::empty_array(),
+ Object::empty_array());
}
} else {
stacktrace ^= existing_stacktrace.raw();
+ // Since we are re throwing and appending to the existing stack trace
+ // we clear out the catch trace collected in the existing stack trace
+ // as that trace will not be valid anymore.
+ stacktrace.SetCatchStacktrace(Object::empty_array(),
+ Object::empty_array(),
+ Object::empty_array());
}
}
// We expect to find a handler_pc, if the exception is unhandled

Powered by Google App Engine
This is Rietveld 408576698