The higher level procedure which uses these three functions could use defer to ensure that the closing function is called.
I try and totally avoid panics and never throw them unless its at some initial parser stage. But this is made me rethink the structure of how some of my tags operate in my interpreter / transpiler.