Why does File.Open in .Net throw exceptions and not follow exception handling best practices? [duplicate]
This question already has answers here: I’ve been told that Exceptions should only be used in exceptional cases. How do I know if my case is exceptional? (12 answers) Closed 11 years ago. I have read at many places including this – http://msdn.microsoft.com/en-us/library/seyhszts.aspx – that you should use exception handling when something is truly exceptional. […]
Is it a acceptable approach to put try catch wherever null pointer exception occurs?
There are instances where the references to objects, fields, variables etc can be null and there might be a possible occurrence of Null Pointer exception occurring at that point.
Error handling – Should a program fail on errors or silently ignore them
I’m writing a simple little program to transmit MIDI over a network. I know that the program will encounter transmission problems and / or other exception situations that I won’t be able to predict.
Wrapping specific checked exception in domain unchecked ones? [duplicate]
This question already has answers here: Is it good practice to catch a checked exception and throw a RuntimeException? (13 answers) Closed 11 years ago. Uncle Bob says in Clean Code book that Unchecked Exceptions should be used. Now JDK has some checked exceptions: IOException, IllegalAccessException etc. which cannot be avoided. In my application logic […]
Exception Handling in Java web application
I know exception handling is a topic often discussed in the world of Java. I’ve read a few threads on here and SO as well.
Can AspectJ or AOP in general be used to test exception handling?
I’m reading a book’s chapter (“Controlled Exception Test” in “Testing Object-Oriented Testing”) about testing exception handling in a running system (not at unit level). The conclusion is that it is hard to automatically trigger an exception at a given layer in the system other then simulate a cause for an exception.
What are the guidelines for either throwing an exception or failing silently for nonvalid arguments? [duplicate]
This question already has answers here: Error handling – Should a program fail on errors or silently ignore them (10 answers) Closed 10 years ago. If you look at XContainer.Add(object content) method you can see that id does not require content to be not null. It just does nothing in case of null. However List.AddRange(IEnumerable […]
What are the guidelines for either throwing an exception or failing silently for nonvalid arguments? [duplicate]
This question already has answers here: Error handling – Should a program fail on errors or silently ignore them (10 answers) Closed 10 years ago. If you look at XContainer.Add(object content) method you can see that id does not require content to be not null. It just does nothing in case of null. However List.AddRange(IEnumerable […]
What are the guidelines for either throwing an exception or failing silently for nonvalid arguments? [duplicate]
This question already has answers here: Error handling – Should a program fail on errors or silently ignore them (10 answers) Closed 10 years ago. If you look at XContainer.Add(object content) method you can see that id does not require content to be not null. It just does nothing in case of null. However List.AddRange(IEnumerable […]