Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #121419
| From | wij <wyniijj5@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: We have a new standard! |
| Date | 2025-01-05 07:14 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <67d0fcdaa9aa19d56b3237d2bf2030bc838ecb5b.camel@gmail.com> (permalink) |
| References | (3 earlier) <vl8sfi$3u4fh$1@dont-email.me> <cone.1735919451.379621.297354.1000@ripper.email-scan.com> <vl9eq7$1n1d$1@dont-email.me> <cone.1735956395.711486.303344.1000@ripper.email-scan.com> <vlbte2$imdo$1@dont-email.me> |
On Sat, 2025-01-04 at 20:08 +0200, Paavo Helde wrote: > On 04.01.2025 04:06, Sam wrote: > > Paavo Helde writes: > > > > > > > > Anyway, avoiding uncaught exceptions is easy, one just has to place > > > catch(...) in main() and in all thread functions. Problem solved. > > > > Sure, catch(...) deals with it. But it gives you nothing useful to work > > with. A valiant attempt to send a bat-signal to std::current_exception > > will eke out a few useful bits, if one's lucky, but the end result will > > just be more spaghetti code. > > If an exception has reached the top-level catch, then this means that > all lower levels (which have more knowledge about the context) have not > been able to catch and handle it. In the top-level catch there is little > hope I could do anything smarter, typically I just need to report or log > an error message. > > So there is no need to differentiate between different types of > exceptions or to extract any useful bits from them, all I need is an > error message. For that I have a little helper function which can be > called from inside catch(...) and which handles various exception base > classes and falls back to typeid(e).name() for unknown types. Actually I > am not interested in exception types at all at this point, not to speak > about enforcing them somehow. If there appear new exception base > classes, I add support for them in the helper function, not trying to > reduce their usage. This is an interrupt, I didn't read the context of this thread. std::except was a big blunder (not invented by B.S.). It is similar to errno or a global object, you set it up and throw. C++ hide it in a beautiful theory called 'advanced error handling'.... long story. > [...] > > > > > I dunno, maybe something like: > > > > typedef throws(ClassA, ClassB) AlgoThrownClasses; > > > > Then you go ahead and declare your algorithm: > > > > void my_algorithm(algorithm_info_t &) throws(AlgoThrownClasses) > > That's the first good idea from you in this discussion. I still do not > see much point in exception specifications, but such a typedef would at > least make life easier for me on this Alternate Earth. > > PS. Nowadays they prefer `using` instead of `typedef`. > >
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-01 18:25 +0200
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-01 16:33 +0000
Re: We have a new standard! Ross Finlayson <ross.a.finlayson@gmail.com> - 2025-01-01 09:41 -0800
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-02 08:06 +0100
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-02 09:23 +0000
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-02 13:51 +0100
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-02 14:07 +0000
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-02 17:54 +0100
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-02 17:15 +0000
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-02 13:58 -0800
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-03 10:13 +0000
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-03 11:22 -0800
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-04 10:17 +0000
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-04 12:31 +0100
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-04 11:34 +0000
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-04 14:01 +0100
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-04 15:49 +0000
Re: We have a new standard! Ross Finlayson <ross.a.finlayson@gmail.com> - 2025-01-03 17:42 -0800
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-02 15:20 -0500
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-03 13:43 +0100
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 08:11 -0500
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-03 16:33 +0200
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 10:50 -0500
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-03 16:09 +0000
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 11:53 -0500
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-03 17:10 +0000
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 12:14 -0500
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-04 10:13 +0000
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-03 18:17 +0100
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 13:58 -0500
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-04 12:39 +0100
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-04 09:56 -0500
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-03 21:46 +0200
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 21:06 -0500
Re: We have a new standard! Ross Finlayson <ross.a.finlayson@gmail.com> - 2025-01-03 18:32 -0800
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-04 20:08 +0200
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-04 14:46 -0500
Re: We have a new standard! wij <wyniijj5@gmail.com> - 2025-01-05 07:14 +0800
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-06 08:38 +0000
Re: We have a new standard! Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-01-07 08:40 -0500
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-07 14:04 +0000
Re: We have a new standard! Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-01-08 14:52 -0500
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 13:31 -0800
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-09 08:39 +0000
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-07 21:32 -0500
Re: We have a new standard! Ross Finlayson <ross.a.finlayson@gmail.com> - 2025-01-03 17:49 -0800
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-03 17:12 +0100
Re: We have a new standard! Sam <sam@email-scan.com> - 2025-01-03 11:56 -0500
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-02 17:35 +0200
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-02 17:57 +0100
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-02 19:55 +0200
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-02 13:40 -0800
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-03 09:42 +0100
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-02 13:38 -0800
Re: We have a new standard! Muttley@DastardlyHQ.org - 2025-01-03 10:09 +0000
Re: We have a new standard! Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-03 11:19 -0800
Re: We have a new standard! Muttley@dastardlyhq.com - 2025-01-04 10:15 +0000
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-01 22:43 +0200
Re: We have a new standard! David Brown <david.brown@hesbynett.no> - 2025-01-02 07:56 +0100
Re: We have a new standard! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-02 00:39 -0800
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-02 12:31 +0200
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-02 14:59 +0200
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-02 15:50 +0200
Re: We have a new standard! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-07 21:15 -0800
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-08 08:44 +0200
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-08 11:44 +0200
Re: We have a new standard! James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-08 15:04 -0500
Re: We have a new standard! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-14 08:49 -0800
Re: We have a new standard! Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-14 09:12 -0800
Re: We have a new standard! Paavo Helde <eesnimi@osa.pri.ee> - 2025-01-14 19:53 +0200
Re: We have a new standard! "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-08 14:43 -0800
Re: We have a new standard! scott@slp53.sl.home (Scott Lurndal) - 2025-01-02 20:51 +0000
Re: We have a new standard! Michael S <already5chosen@yahoo.com> - 2025-01-02 16:47 +0200
csiph-web