Is it possible to catch errors of an external program launched within runtime?
Let's say for example I'm writing to a file and the file doesn't have enough contents to be "openable" so when launching the program giving the filename as a parameter I get an error. Later on processing is done and the file becomes launchable.
How can I detect this? Do I have to rely on a fixed file size (checking for a particular file size) or is there a way how to do this dynamically within runtime, i.e if file is not openable try reopening file after some other events have occurred (example events that are filling the file with content)