Subject: How do the exceptions work?
From: [email-masked] (Roumen Al. Dimitrov)

21 Jul 1998 10:24:37 -0700
Message-ID: <[email-masked]>
Reply-To: "Roumen Al. Dimitrov" <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

Hallo,

I have written a small program as follows:

#include <fstream.h>

class e
	{
public:
	e (int i=0) {x=i;};
	~e () {};
	int x;
	};

void proc () throw (e)
	{
	throw e (3);
	}

void main ()
	{
	cout << "<enter>\n";
	cout.flush ();
try {
	proc ();
	}
catch (e x)
	{
	cerr << "exception occured: " << x.x << '\n';
	cerr.flush ();
	}
	cout << "\nOK\n";
	}

and here is the output:

<enter>
Aborted

Can you say me, how can I obtain something like:

<enter>
exception occured: 3
OK

which is much more correct? Under Unix and the older Cygnus GNU C 2.7.2.2 is
everything OK (well, not enough OK - it happens one Internal Compiler Error
because of the last line)
SIFRAME Software Technologies GmbH
Roumen Al. Dimitrov
Rottmannstrasse 7a
80333 Muenchen
Germany
mailto:[email-masked]
Telefon +49 89 523 70-77
Telefax +49 89 523 70-73
Info: http://www.siframe.de

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".