Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-08-12 02:19:54


At Sunday 2002/08/11 15:30, you wrote:
[deleted]
                try
>> {
>> main(argc, 0);
>
>Results in undefined behavior. You're not allowed to call
>main(). Anything that happens next means nothing.
>
>> }
>> catch (exception& e)
>> {
>> cout << setw(2*argc) << ' ' << "exception: " <<
>> argc << " " << e.what() << endl;
>> }
>> cout << setw(2*argc) << ' ' << "returned from main: " <<
>> argc << endl;
>> }
>> if (argc > 2)
>> {
>> throw exception(("throwing: " +
>> boost::lexical_cast<string>(argc)).c_str());
>> }
>> cout << setw(2*argc) << ' ' << "returning: " << argc << endl;
>>}
>
>I'm not sure what you were trying to illustrate with this code... but the
>use of illegal C++ would seem to make anything you observe irrelavant.

that you do NOT want to implement any form of exception passing across
thread boundaries is pellucidly clear.
Why don't you just say "I don't want to...and I wont!" and let it go at
that. Then we can all save some time.

btw, why the heck is it "legal" for you to "start a thread" executing at
main() but NOT legal to "call" main()?
I know, I know, the "standard" says you can't call main(). (as you report).

You certainly bandy about the old standard when it suits your purpose and I
believe you have mis-read it miserably in an attempt to justify a poor
decision on your part (not allowing exceptions to be passed back).

>Bill Kempf
>williamkempf_at_[hidden]

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk