diff --git a/core/base64.js b/core/base64.js index 5182c295..48e28c31 100644 --- a/core/base64.js +++ b/core/base64.js @@ -100,7 +100,7 @@ export default { // If there are any bits left, the base64 string was corrupted if (leftbits) { - err = new Error('Corrupted base64 string'); + var err = new Error('Corrupted base64 string'); err.name = 'Base64-Error'; throw err; } diff --git a/core/websock.js b/core/websock.js index a4959152..f9c1256c 100644 --- a/core/websock.js +++ b/core/websock.js @@ -267,7 +267,7 @@ Websock.prototype = { if (this._rQbufferSize > MAX_RQ_GROW_SIZE) { this._rQbufferSize = MAX_RQ_GROW_SIZE; if (this._rQbufferSize - this._rQlen - this._rQi < min_fit) { - throw new Exception("Receive Queue buffer exceeded " + MAX_RQ_GROW_SIZE + " bytes, and the new message could not fit"); + throw new Error("Receive Queue buffer exceeded " + MAX_RQ_GROW_SIZE + " bytes, and the new message could not fit"); } }