ref[JS]: js protocol

This commit is contained in:
godotg committed 2024-07-15 17:28:02 +08:00
1 parent 0b0b337eca
commit 6fbb0b90fb
5 files changed
+8 -8

No files matched your search

@@ -92,7 +92,7 @@ namespace zfoocs
throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readOffset: " + throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readOffset: " +
readOffset + readOffset +
", writeOffset: " + writeOffset + ", writeOffset: " + writeOffset +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length) + ")"; "(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length + ")");
} }
writeOffset = writeIndex; writeOffset = writeIndex;
} }
@@ -108,7 +108,7 @@ namespace zfoocs
{ {
throw new Exception("readIndex[" + readIndex + "] out of bounds exception: readIndex: " + readOffset + throw new Exception("readIndex[" + readIndex + "] out of bounds exception: readIndex: " + readOffset +
", writeOffset: " + writeOffset + ", writeOffset: " + writeOffset +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length) + ")"; "(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length + ")");
} }
readOffset = readIndex; readOffset = readIndex;
} }
@@ -100,7 +100,7 @@ const ByteBuffer = function() {
if (writeIndex > this.buffer.byteLength) { if (writeIndex > this.buffer.byteLength) {
throw new Error('writeIndex out of bounds exception: readOffset: ' + this.readOffset + throw new Error('writeIndex out of bounds exception: readOffset: ' + this.readOffset +
', writeOffset: ' + this.writeOffset + ', writeOffset: ' + this.writeOffset +
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength) + ')'; '(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength + ')');
} }
this.writeOffset = writeIndex; this.writeOffset = writeIndex;
}; };
+2 -2
View File
@@ -123,7 +123,7 @@ namespace zfoo {
"writeIndex[" + std::to_string(writeIndex) + "] out of bounds exception: readOffset: " + "writeIndex[" + std::to_string(writeIndex) + "] out of bounds exception: readOffset: " +
std::to_string(readOffset) + std::to_string(readOffset) +
", writeOffset: " + std::to_string(writeOffset) + ", writeOffset: " + std::to_string(writeOffset) +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + std::to_string(max_capacity); "(expected: 0 <= readOffset <= writeOffset <= capacity:" + std::to_string(max_capacity) + ")";
throw errorMessage; throw errorMessage;
} }
writeOffset = writeIndex; writeOffset = writeIndex;
@@ -135,7 +135,7 @@ namespace zfoo {
"readIndex[" + std::to_string(readIndex) + "] out of bounds exception: readOffset: " + "readIndex[" + std::to_string(readIndex) + "] out of bounds exception: readOffset: " +
std::to_string(readOffset) + std::to_string(readOffset) +
", writeOffset: " + std::to_string(writeOffset) + ", writeOffset: " + std::to_string(writeOffset) +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + std::to_string(max_capacity); "(expected: 0 <= readOffset <= writeOffset <= capacity:" + std::to_string(max_capacity) + ")";
throw errorMessage; throw errorMessage;
} }
readOffset = readIndex; readOffset = readIndex;
@@ -92,7 +92,7 @@ namespace zfoocs
throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readOffset: " + throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readOffset: " +
readOffset + readOffset +
", writeOffset: " + writeOffset + ", writeOffset: " + writeOffset +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length); "(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length + ")");
} }
writeOffset = writeIndex; writeOffset = writeIndex;
} }
@@ -108,7 +108,7 @@ namespace zfoocs
{ {
throw new Exception("readIndex[" + readIndex + "] out of bounds exception: readIndex: " + readOffset + throw new Exception("readIndex[" + readIndex + "] out of bounds exception: readIndex: " + readOffset +
", writeOffset: " + writeOffset + ", writeOffset: " + writeOffset +
"(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length); "(expected: 0 <= readOffset <= writeOffset <= capacity:" + buffer.Length + ")");
} }
readOffset = readIndex; readOffset = readIndex;
} }
@@ -100,7 +100,7 @@ const ByteBuffer = function() {
if (writeIndex > this.buffer.byteLength) { if (writeIndex > this.buffer.byteLength) {
throw new Error('writeIndex out of bounds exception: readOffset: ' + this.readOffset + throw new Error('writeIndex out of bounds exception: readOffset: ' + this.readOffset +
', writeOffset: ' + this.writeOffset + ', writeOffset: ' + this.writeOffset +
'(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength) + ')'; '(expected: 0 <= readOffset <= writeOffset <= capacity:' + this.buffer.byteLength + ')');
} }
this.writeOffset = writeIndex; this.writeOffset = writeIndex;
}; };