From ff6eefdf87560986274799132d44b00e0a288c21 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 8 Sep 2018 16:37:49 -0400 Subject: Add better assert message for CodeFetchRes --- js/os.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/os.ts b/js/os.ts index f4f5e35d1..e49896c51 100644 --- a/js/os.ts +++ b/js/os.ts @@ -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 { -- cgit v1.2.3