Hello Vlad -
I took the liberty of deleting the duplicate thread for this issue so we can keep replies in one place. Going forward please do not create duplicate threads. I think you'll find most regulars here use the "New Posts" link near the top of the front page, so they'll find your post no matter where it is. If you'd like to move a post to a section you feel is a better fit, just let me know and I can do that.
As for your issue, the most common way to handle non-termination errors in LiveCode is to check the value of "the result" immediately after the command in question.
So in your case, try:
- Code: Select all
delete file tFilePath
if the result is not empty then
answer "Couldn't delete file (" & sysError() &")"
exit to top
There "the result" will be empty on success, and if it fails it'll contain a string something like "couldn't delete file". The additional call to the sysError function will query the OS for the specific error code related to the failure.
Once you know why the delete command is failing, we can determine options for handling that.