Nim has try finally that can be used for this, and in my view it makes more 
sense than an else clause on a try.
    
    
    import std/strutils
    
    proc parseAnInt(s: string) =
      try:
        discard parseInt(s)
      finally:
        if getCurrentException() == nil:
          echo "We did parse"
    
    parseAnInt"10"
    parseAnInt"hello"
    
    
    Run

Reply via email to