Is there anything special to consider when writing my own exception class in C++? [closed]
Closed 11 years ago.
The suffix Exception on exceptions in java
Specifying a suffix of Exception on exception classes feels like a code smell to me (Redundant information – the rest of the name implies an error state and it inherits from Exception). However, it also seems that everyone does it and it seems to be good practice.
Are exceptions as control flow considered a serious antipattern? If so, Why?
Back in the late 90’s I worked quite a bit with a code base that used exceptions as flow control. It implemented a finite state machine to drive telephony applications. Lately I am reminded of those days because I’ve been doing MVC web apps.
How many are too many nested function calls?
Quoted from MSDN about StackOverflowException:
better way to define an exception thrown by a method in Java?
I know how to define exceptions and all, but I’m not sure if the way I’m doing it is the most intuitive and readable by another users.
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 […]
Why is Option/Maybe considered a good idea and checked exceptions are not?
Some programming languages like e.g. Scala have the concept of Option
types (also called Maybe
), which can either contain a value or not.
Assertions vs Exceptions – is my understanding of the differences between the two correct? [duplicate]
Design By Contract uses preconditions and postconditions of the public
methods in a class together to form a contract between the class and
its clients.
Why is there no ‘finally’ construct in C++?
Exception handling in C++ is limited to try/throw/catch. Unlike Object Pascal, Java, C# and Python, even in C++ 11, the finally
construct has not been implemented.
Best Practice for Argument Checking
Say I have a web service with a method MyWebServiceMethod(string passedValue)
.