mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Fix stack trace bug on safari
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user