Article View: borland.public.cppbuilder.nativeapi
Article #2191Re: log10: SING Error -> Try/Catch??
From: Thomas Maeder [TeamB]
Date: Tue, 24 Apr 2007 16:12
Date: Tue, 24 Apr 2007 16:12
28 lines
2069 bytes
2069 bytes
Dan <Dan@do.not.spam> writes: >> The return type of main() has to be int. > > Ok; I just used this as an example; of course I didn't strictly copy > and paste code, but instead just tried to make an example (I work in > the embedded world more often, and void main() is acceptable > there. My apologies. void main() isn't acceptable anywhere. At no time in history did C or C++ accept any return type from main() other than int. All this isn't extremely important, but whenever somebody posts code to a newsgroup, somebody else might use it as a (good) example; I therefore tend to be pedantic. My apologies :-) >> Because what the program does is causing undefined behavior, not >> throwing exceptions. > > Is there a way to catch these so that they don't go all the up to > the top of the application? > >> Have you considered providing your own version of _matherr()? > > How? RTFM. Or Google. Or both.
Technical Details
Message-ID:
<m2slap21li.fsf@glue.ch>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<462631f7@newsgroups.borland.com> <m2r6qh32u2.fsf@glue.ch> <462e0d4f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5a0a347bf89aa6bf
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: log10: SING Error -> Try/Catch??
References: <462631f7@newsgroups.borland.com> <m2r6qh32u2.fsf@glue.ch>
<462e0d4f$1@newsgroups.borland.com>
From: maeder@glue.ch (Thomas Maeder [TeamB])
Organization: TeamB
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Date: Tue, 24 Apr 2007 18:12:25 +0200
Message-ID: <m2slap21li.fsf@glue.ch>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)
Cancel-Lock: sha1:4fDkV4LQAnMjXElYZ/9AqxUlcAw=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: 84.73.227.225
X-Trace: newsgroups.borland.com 1177431208 84.73.227.225 (24 Apr 2007 09:13:28 -0700)
Lines: 28
X-Authenticated-User: tmaeder
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail