mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +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.result_message = this.result_message || this.error_message || 'Error';
|
||||||
this.message = this.result_message;
|
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);
|
util.inherits(RippleError, Error);
|
||||||
|
|||||||
Reference in New Issue
Block a user