Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
You should do both. Creation and catching of exceptions can be an expensive process and even if the check for the file succeeds the loading of the file may not in which case you’ll need to handle the exceptions anyway.
You should do both. Creation and catching of exceptions can be an expensive process and even if the check for the file succeeds the loading of the file may not in which case you’ll need to handle the exceptions anyway.