When quit() is called in try block, the finally block is not executed. It is 
only executed after normal finish or exception is raised. I got around the 
problem I needed to solve with addquitproc but I am curious if this is how 
'finally is supposed to work in nim.
    
    
    proc qproc(){.noconv.} =
        echo 43
    
    when isMainModule:
        try:
            #addQuitProc(qproc)
            #raise newException(SystemError,"Help")
            echo 41
            quit()
        except:
            echo "exception"
        finally:
            echo 42
    

Reply via email to