mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-03 07:59:50 -04:00
Fix error handling using undefined variables
This commit is contained in:
parent
35c980465e
commit
e260f15163
@ -67,7 +67,7 @@ function writeArray(value, buffer, offset, typeArgs, rootNode) {
|
|||||||
tryCatch(() => {
|
tryCatch(() => {
|
||||||
offset = this.write(value[index], buffer, offset, typeArgs.type, rootNode);
|
offset = this.write(value[index], buffer, offset, typeArgs.type, rootNode);
|
||||||
}, (e) => {
|
}, (e) => {
|
||||||
addErrorField(e, i);
|
addErrorField(e, index);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ function sizeOfArray(value, typeArgs, rootNode) {
|
|||||||
tryCatch(() => {
|
tryCatch(() => {
|
||||||
size += this.sizeOf(value[index], typeArgs.type, rootNode);
|
size += this.sizeOf(value[index], typeArgs.type, rootNode);
|
||||||
}, (e) => {
|
}, (e) => {
|
||||||
addErrorField(e, i);
|
addErrorField(e, index);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user