Hi,
These functions will throw an exception if they fail, which you can trap with Try/Catch.
Changing them to check for a null stream means they would still have to do something to indicate an error - but what?
For example, how would you indicate that LoadByteArray failed? Returning an empty array wouldn't work as this could also be a successful result. You could change to a 'Var' parameter setup, but that gets pretty ugly.
Best move really is to make sure files exist before reading them.
These functions will throw an exception if they fail, which you can trap with Try/Catch.
Changing them to check for a null stream means they would still have to do something to indicate an error - but what?
For example, how would you indicate that LoadByteArray failed? Returning an empty array wouldn't work as this could also be a successful result. You could change to a 'Var' parameter setup, but that gets pretty ugly.
Best move really is to make sure files exist before reading them.