The title might be slightly confusing. What I mean is this. Let's say I have a code block which has some error checking code. If there is an error, the (tangled) program should not continue past that point. Let's say I work with python. If I have a source code like this
if len(dummy_list) == 0:
print("Error!!!")
sys.exit(0)
Executing this in a code block makes EMACS hang. So I don't want this line to be executed in my source block. But I want this line to be present in the tangled source code. Moreover, it would be great if there was a way to destroy the current running session when I counter an error. Is there a way to achieve this?