Throw an exception in try catch block
28
try {
if (isFileDownloaded)
// do stuff
else
throw new CustomException()
}
catch (Exception e)
{
// something went wrong to save the error to log
}
finally
{
//release resources
}
My question is would the catch
catches the ApplicationException
thrown in the try block? is it in poor coding style?
Should it be written in another way?