Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » does u++ not support C++ exception ???
does u++ not support C++ exception ??? [message #39184] Mon, 25 February 2013 10:03 Go to next message
porschee is currently offline  porschee
Messages: 1
Registered: February 2013
Junior Member
Code as follows :

int x = 0 ;

try
{
int y = 100 ;

int z = y/x ;
}
catch(...)
{
PromptOK("Exception ...");
}

but catch(...) can not catch


????
Re: does u++ not support C++ exception ??? [message #39185 is a reply to message #39184] Mon, 25 February 2013 10:55 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

porschee wrote on Mon, 25 February 2013 10:03

Code as follows :

int x = 0 ;

try
{
int y = 100 ;

int z = y/x ;
}
catch(...)
{
PromptOK("Exception ...");
}

but catch(...) can not catch


????

Hi porschee,

Welcome to the forums Cool

U++ does support exceptions.

The division by zero does not result in an exception in standard C++. According to standard:
Quote:

If the second operand of / or % is zero, the behavior is undefined.
You need to check the value yourself and throw exception if desired...

Best regards,
Honza
Previous Topic: Ultimate++ vs WTL and others?
Next Topic: Scatter-demo crash
Goto Forum:
  


Current Time: Fri Apr 19 13:44:45 CEST 2024

Total time taken to generate the page: 0.02622 seconds