In general, you want to handle the error when it makes sense to do it.
If in your example above you want to try to read the file, and if that fails, read the default file, you can process it as in the first example.
readFile main(), , , , readFile(), , .
, ( ) - - .
, , , . , .