diff --git a/src/js/ripple/rippleerror.js b/src/js/ripple/rippleerror.js index 30fbf780..469afc47 100644 --- a/src/js/ripple/rippleerror.js +++ b/src/js/ripple/rippleerror.js @@ -16,7 +16,11 @@ function RippleError(code, message) { this.result_message = this.result_message || this.error_message || 'Error'; this.message = this.result_message; - Error.captureStackTrace(this, code || this); + var stack; + if (!!Error.captureStackTrace) + Error.captureStackTrace(this, code || this); + else if (stack = new Error().stack) + this.stack = stack; } util.inherits(RippleError, Error);