An exception is a rarely occurring (exceptional!) condition that requires deviation from the program's normal flow.
2
votes
1answer
151 views
Is there anything wrong with my self-implemented C++ exception class?
I wrote my own exception class, deriving from std::runtime_error to have Error-IDs, timestamps and inner exceptions.
It seems to work, but are there any drawbacks?
The only thing I see is the ...
2
votes
2answers
1k views
Generic C++ exception catch handler macro
I have this set of legacy C++ projects with a large number of public functions. At the start none of those publicly exposed functions had try..catch insulation inside them. When a C++ exception ...
13
votes
5answers
825 views
What’s your opinion on a Throw() method?
Lately I seem to run into a situation very frequently where I want to write something like the following:
var x =
condition1 ? value1 :
condition2 ? value2 :
condition3 ? value3 :
...