Catch a file open for writing error exception
Hello again,
Recently i was testing some dev versions of 105 client with broken file download recovery functions (first version, and the last branch). I was making some test, with deleting layout files, content files etc.
Some times on screen appear a runtime error, that file cannot be opened becouse other process opened it already (xxx.mpeg - my movie file)
Probably with normal usage situation this error should never appear and it's appeared becouse deletion of some random files after client shutdown an before opening it again etc. Maybe some sequence of event tooks place that was not supposed to happen in normal operation. Or maybe windows was genrating thumbs etc. Probably the same situation will appear when there will be no more free disk space etc.
But maybe regardless of that its a good conception to generally catch those file open for writing error (with exception for logfile ofcourse -that could be hard to log :)) and log them instead of displaying .net error on screen forever :)
For example a would prefer a some broken files on client that still running rest of content that was downloaded correctly, than client with beautiful error on screen center...
Later maybe marking files with writing error as unusable in memory (and maybe try to write them again on the end of queue etc) is worth of consideration, but in stable branch probably not a good idea.
Of course best idea is to predict all possible situations ;) but it's probably impossible (filesystem errors, some antiviruses file actions, everything else etc) :)
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Xibo Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Bartek for more information if necessary.