This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sun, 2003-03-16 at 20:34, Max Bowsher wrote: > Robert Collins wrote: > > Max Bowsher wrote: > >> Robert, > >> > >> Currently setup uses both <stdexcept> exceptions, and its own > >> std::exception-derived Exceptions. > >> > >> I'm about to write a patch to convert the kludgy > >> > >> if (error) > >> exit(some_random_exit_code); > >> > >> bits to exceptions. Which kind shall I use, and would you be > >> interested in a patch to convert all of them over to one kind? > >> > >> Max. > >> > > > > I need to think on this. > > OK. How about I convert the kludgy exits to Exceptions, and change them to > <stdexcept>s later, along with the rest, if that's what you decide? Well, if the thread limitations for c++ exceptions on mingw have been resolved (have they?) we can start widespread use of exceptions. Until now we've been limited to using them in race-safe ways. (i.e. one context / thread at a time). The exits that are marked /* XXX FIXME use an exception */ or similar are good to be converted. They must not be caught within setup (because these bits of code are by definition something we can't handle). (Perhaps - only perhaps - via a terminate handler.). So subclassing Exception will only do if they will be thrown again under any circumstance. Ditto. Before doing this, please test (via a test_foo program, I want to be able to detect gcc regressions should they occur) for cross-thread-unhandled-exception behaviour and message-handler-owned-thread exception behaviour. Specifically, main() won't see most, if any exceptions. The 'new' failure checks should be fine - simply put a little test in to use up all your ram and see if a new exception is thrown. Rob -- GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
Attachment:
signature.asc
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |