Browse files

[enhance] runtime: Print backtrace (if found one) on failure

  • Loading branch information...
1 parent a31d080 commit ad16c1fd1668a63914202370d2dd66524b08417d @BourgerieQuentin BourgerieQuentin committed Oct 11, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/plugins/opabsl/jsbsl/bslPervasives.js
View
4 lib/plugins/opabsl/jsbsl/bslPervasives.js
@@ -233,7 +233,9 @@ var field_position = static_field_of_name("position");
* @opacapi
*/
function fail_cps(message, position, k) {
- console.error(""+position+"\nfail: "+message);
+ var trace = get_cps_trace(k);
+ if(trace!="") trace = "\n*** Stack trace:\n" + trace;
+ console.error(""+position+"\nfail: "+message+trace);
var r = empty_constructor();
r = add_field(r, field_fail, message);
r = add_field(r, field_position, position);

0 comments on commit ad16c1f

Please sign in to comment.