For some reason this is not catching the exception and crashing with a 
"SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
    
    
    proc select_all(): Future[seq[Table[string, string]]] {.async.} =
      var dbC: DbColumns = @[]
      var data = newSeq[Table[string, string]]()
      for x in db.instantRows(dbC, sql(SELECT_ALL % table_name)):
        var row = initTable[string, string]()
        for idx, column in dbC:
          try:
            row[column.name] = "$#" % x[idx]
          except:
            row[column.name] = "none"
        data.add(row)
     result = data
    

Am I doing something wrong...?

Reply via email to