try {
if (isFileDownloaded)
// do stuff
else
throw new CustomException()
}
catch (Exception e)
{
// something went wrong to save the error to log
}
finally
{
//release resources
}
我的问题是,catch
会捕获try块中抛出的ApplicationException
吗?这种写法是否不好?是否应该用另一种方式书写?
ApplicationException
? - mhrsalehi