4 ms·
> exceptions are features of C++ that I never see used in real-world C++ Well, I use exceptions in exactly one situation: my request handlers on the server are
by erichocean 10y ago
> exceptions are features of C++ that I never see used in real-world C++
Well, I use exceptions in exactly one situation: my request handlers on the server are all one-shot, transactional, and throwing anywhere unwinds to the top of the stack, aborts the transaction, and results in an error message being returned to the caller.
For that specific use case, I find exceptions cleaner than any other approach I've tried. Otherwise, I avoid them as well.
- pmelendez 10y agoDo you work for a Foreign Exchange company? We used it exactly for the same scenario at a previous employer.
- erichocean 10y agoI do not, but thanks for the info I'm not the only one!