Fix: undefined err, undefined Exception

This commit is contained in:
Vlastimil Sadilek 2018-05-04 14:23:02 +02:00
parent 43bbaa8d6e
commit f3e2fc58ec
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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");
}
}