Throw an exception in try catch block

asked15 years ago
last updated4 years ago
viewed80.3k times
Up Vote28Down Vote
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?