In grain-lang/grain#2352 I was trying to get the type_metadata segment using Binaryen.Memory.get_segment_data(asm, "type_metadata") however if the data segment doesn't exist we get a fatal cpp error that we do not handle and is uncatachable from grain. We should either find a way to catch that error or investigate if there is any way to pre-validate the segment exists.