summaryrefslogtreecommitdiff
path: root/js/format_error.ts
diff options
context:
space:
mode:
authorJonathon Orsi <jonathon.orsi@gmail.com>2019-04-07 20:51:43 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-04-07 20:51:43 -0400
commit3452a10840ef47bb5546969ebe776289c7b095f1 (patch)
tree165439d870c7fdc2b914d9e008162ea7c17b4cb2 /js/format_error.ts
parent86aee7f13751bd4707f6c2fe367be2359fde84b2 (diff)
use flatbuffer create functions to add fields (#2046)
Diffstat (limited to 'js/format_error.ts')
-rw-r--r--js/format_error.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/js/format_error.ts b/js/format_error.ts
index 7cdbd72c3..1c79f36fc 100644
--- a/js/format_error.ts
+++ b/js/format_error.ts
@@ -7,9 +7,7 @@ import { assert } from "./util";
export function formatError(errString: string): string {
const builder = flatbuffers.createBuilder();
const errString_ = builder.createString(errString);
- msg.FormatError.startFormatError(builder);
- msg.FormatError.addError(builder, errString_);
- const offset = msg.FormatError.endFormatError(builder);
+ const offset = msg.FormatError.createFormatError(builder, errString_);
const baseRes = sendSync(builder, msg.Any.FormatError, offset);
assert(baseRes != null);
assert(msg.Any.FormatErrorRes === baseRes!.innerType());