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

X-Authentication-Warning: student.rau.ac.za: httpd set sender to s9800973 using -f
From: "Wynand Van Staden" <s9800973 AT student DOT rau DOT ac DOT za>
To: <djgpp AT delorie DOT com>
Date: Thu, 28 Oct 1999 06:46:02 +0000 (GMT)
Organization: RAU Student Server
X-Mailer: ObsidianSystems-OcsEmail1-0-26 brewed at www.obsidian.co.za
Message-ID: <94109316210248-28084610248s9800973@student.rau.ac.za>
Subject: exception handling again....
Reply-To: djgpp AT delorie DOT com

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

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().  

any help would be greatly appreciated.

- Raw text -


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