|
|
|
|
|
by Someone1234
4088 days ago
|
|
I don't understand. Why would you have an empty catch block? He does in his example but that's an example. I cannot see why you'd even write a catch block if it was empty in production code (unless you're trying to do some error-and-continue pattern, which is rare/mostly an anti-pattern). |
|
An easy example are checking if a file exists under Windows 8, it's partly a product of the currently deficient API's but the fastest way to check if a file exists is to try to get it and catch the exception, and you'd want to return bool from a FileExists method