File.close And Runtime Error

andy76andy76 Member Posts: 616
Hello,

I know that FILE.CLOSE function does not return any value. So if there is some problem (example the file is not open) I have a runtime error.
How can I prevent this runtime error?
The function FILE.CREATE and others always return a boolean that I can test.

Thank you very much

Comments

  • kinekine Member Posts: 12,562
    I never had problems with closing the file. If there is some runtime error during close, it means that the file was not correctly open. it means you need to catch all possible problems when opening the file, not when closing...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.