delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/28/10:49:27

From: pavenis AT lanet DOT lv
Message-ID: <B0000106777@stargate.astr.lu.lv>
To: "Wynand Van Staden" <s9800973 AT student DOT rau DOT ac DOT za>, djgpp AT delorie DOT com
Date: Thu, 28 Oct 1999 11:21:26 +0300
MIME-Version: 1.0
Subject: Re: exception handling again....
In-reply-to: <94109316210248-28084610248s9800973@student.rau.ac.za>
X-mailer: Pegasus Mail for Win32 (v3.12a)
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 28 Oct 99, at 6:46, Wynand Van Staden wrote:

> ok, for fear of sounding like a complete idiot this will hopefully be my last attempt at exception handling, otherwise i'll just write some clean readable code and implement it later on.
> 
> //exce.cpp
> 
> #include
 #include <iostream>
> 
> void main()
> {
>     try
>     {
>        cout << "trying...." << endl;
>        throw ((int)5);
>     }
>     catch (int e)
>     {
>        cout << "error val : " << e << endl;
>     }
> }
>                                                                                 
> I have downloaded gcc295b.zip,  gpp295b.zip, and libstcx 295 (lgpp295.zip or something) 
> all this does now is crash rhide and still when i run the exec, it exits with stderr output "Abort!"
> i have not attempted -fsjlj-exceptions with this, as i assume this will also be as slow as in 2.8.1
> 
> the only thing i can perhaps think of is that a try-catch clause is not allowed in main().  
> 

This example works Ok for me.

More likely You have some installation problem. If You have 
djdev201.zip installed then upgrade to djdev202.zip (using djdev201.zip
is not supported)




- Raw text -


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