Fix error message in UhkBuffer

This commit is contained in:
Farkas József
2016-09-24 23:39:08 +02:00
parent 3719a6ece3
commit 5ba0c2d12a

View File

@@ -133,8 +133,8 @@ export class UhkBuffer {
let stringByteLength = Buffer.byteLength(str, UhkBuffer.stringEncoding);
if (stringByteLength > UhkBuffer.maxCompactLength) {
throw 'Cannot serialize string: ${stringByteLength} bytes is larger ' +
'than the maximum allowed length of ${UhkBuffer.maxStringByteLength} bytes';
throw `Cannot serialize string: ${stringByteLength} bytes is larger
than the maximum allowed length of ${UhkBuffer.maxCompactLength} bytes`;
}
this.writeCompactLength(stringByteLength);