I have this piece of code:
    
    
    ...
      var filesize: int
      try:
        filesize = cast[int](getFileSize(path))
      except OSError:
        echo "Error when checking the filesize"
        return
      ...
    
    
    Run

But, when I open a lot of files a got the message and the program crash: 
    
    
    Exception message: Too many open files
    Exception type: [OSError]
    
    
    Run

How to keep the program running?

Reply via email to