www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/26/12:40:34

Message-Id: <3593CD72.B0BC7C1E@inf.ufsm.br>
Date: Fri, 26 Jun 1998 13:33:54 -0300
From: Leonardo Brondani Schenkel <schenkel AT inf DOT ufsm DOT br>
Organization: Informática - UFSM
Mime-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Exception handling

I'm new to DJGPP and I'm having some problems using C++
exception-handling. The following code

> #include <iostream>
> 
> int main()
> {
>	try
>	{
>		cout << "throwing an exception... ";
>		throw("exception throwed!");
>	}
>	catch(const char *msg)
>	{
>		cout << msg << endl;
>	}
>	return 0;
> }

produces the following output:

> throwing an exception... Abort!


	I think unexpected(), or terminate() is been called, but why?
	(I'm using DJGPP 2.1, binutils 2.8.1, gcc 2.8.0, gpp 2.8.0)

	Thanks in advance,
	Leonardo Brondani Schenkel <schenkel AT cpd DOT ufsm DOT br>
	(please reply by e-mail; I'm not a subscriber of the list)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019