提交 ff6eefdf 编写于 作者: R Ryan Dahl

Add better assert message for CodeFetchRes

上级 e226a679
......@@ -30,7 +30,10 @@ export function codeFetch(
const msg = fbs.CodeFetch.endCodeFetch(builder);
const baseRes = send(builder, fbs.Any.CodeFetch, msg);
assert(baseRes != null);
assert(fbs.Any.CodeFetchRes === baseRes!.msgType());
assert(
fbs.Any.CodeFetchRes === baseRes!.msgType(),
`base.msgType() unexpectedly is ${baseRes!.msgType()}`
);
const codeFetchRes = new fbs.CodeFetchRes();
assert(baseRes!.msg(codeFetchRes) != null);
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册