type_to_string: detect type failure in DEVELOPER mode.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-09-21 16:55:18 +09:30
committed by Christian Decker
parent 2736e997f6
commit 1f8564ffae

View File

@@ -33,6 +33,9 @@ const char *type_to_string_(const tal_t *ctx, const char *typename,
break;
}
}
#if DEVELOPER
assert(s);
#endif
if (!s)
s = tal_fmt(ctx, "UNKNOWN TYPE %s", typename);