Skip to content

Commit

Permalink
FLUID-5807: Internally throw and catch the exception so that the stac…
Browse files Browse the repository at this point in the history
…k trace is filled in on IE11. You don't get a stack trace on IE9 whatever you do.
  • Loading branch information
amb26 committed Nov 5, 2015
1 parent 3292dfc commit bc40c83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/framework/core/js/Fluid.js
Expand Up @@ -172,7 +172,11 @@ var fluid = fluid || fluid_2_0_0;
fluid.FluidError = function (/*message*/) {
var togo = Error.apply(this, arguments);
this.message = togo.message;
this.stack = togo.stack;
try { // This technique is necessary on IE11 since otherwise the stack entry is not filled in
throw togo;
} catch (togo) {
this.stack = togo.stack;
}
return this;
};
fluid.FluidError.prototype = Object.create(Error.prototype);
Expand Down

0 comments on commit bc40c83

Please sign in to comment.