diff --git a/Changes.md b/Changes.md index 4ebdf57b9..29f9be9e7 100644 --- a/Changes.md +++ b/Changes.md @@ -11,6 +11,7 @@ you spot any mistakes. * Add types for fractional seconds support * Fix `connection.destroy()` on pool connection creating sequences #1291 * Fix error code 139 `HA_ERR_TO_BIG_ROW` to be `HA_ERR_TOO_BIG_ROW` +* Fix error when call site error is missing stack #1179 * Fix reading password from MySQL URL that has bare colon #1278 * Handle MySQL servers not closing TCP connection after QUIT -> OK exchange #1277 * Minor SqlString Date to string performance improvement #1233 diff --git a/lib/protocol/sequences/Sequence.js b/lib/protocol/sequences/Sequence.js index 9c2f6bfb9..23bc3b184 100644 --- a/lib/protocol/sequences/Sequence.js +++ b/lib/protocol/sequences/Sequence.js @@ -53,12 +53,12 @@ Sequence.prototype._packetToError = function(packet) { return err; }; -Sequence.prototype._addLongStackTrace = function(err) { - if (!this._callSite) { +Sequence.prototype._addLongStackTrace = function _addLongStackTrace(err) { + if (!this._callSite || !this._callSite.stack) { return; } - var delimiter = '\n --------------------\n' ; + var delimiter = '\n --------------------\n'; if (err.stack.indexOf(delimiter) > -1) { return;