Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++.moderated > #7408
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Tue, 15 Mar 2016 12:30:01 -0500 |
| Return-Path | <cppmods@glengoyne.dreamhost.com> |
| Sender | lang-cpp-request@vandevoorde.com |
| Approved | c.l.c.m@bazarov.com |
| Message-ID | <dkqq5hFau71U1@mid.individual.net> (permalink) |
| Newsgroups | comp.lang.c++, comp.lang.c++.moderated |
| From | Bo Persson <bop@gmb.dk> |
| Subject | Re: C++ exceptions are broken. |
| Organization | unknown |
| References | <wuCdnSxusZPATkDLnZ2dnUU7-VlQAAAA@giganews.com> <20160308184714.bdb1e8f73fd1db86e9c83dc9@speakeasy.net> <NN-dnVoIWp4b-XnLnZ2dnUU7-WVj4p2d@giganews.com> <20160313124838.377cf0fcbce06a95bb9167ff@speakeasy.net> <87d1qy5aab.fsf@gmail.com> |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| X-Original-Date | Tue, 15 Mar 2016 17:05:05 +0100 |
| X-Submission-Address | lang-cpp-submit@vandevoorde.com |
| Date | Tue, 15 Mar 2016 12:22:07 CST |
| Lines | 35 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-lpN6ZrY2vR6mEoqTJqgJPKwTailhxeAQrGmnjAdCYvY4UPIkvsaWl57qYr4hK7zD+zzgKE7KTH28njk!sUAf4fx9oTeOOQF6lx9yFqo7bkV3lf65E0tWZSxwehPGFYl7GSHO4ylC3CU= |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2165 |
| Xref | csiph.com comp.lang.c++:41526 comp.lang.c++.moderated:7408 |
Cross-posted to 2 groups.
Show key headers only | View raw
On 2016-03-15 15:45, Gareth Owen wrote:
>
> "James K. Lowden" <jklowden@speakeasy.net> writes:
>
>> Oh, so you mean that the programmer may do something in handling the
>> exception to convert logic_error to runtime_error. Sure.
>
> No, the problem is
>
> throw std::logic_error("I've made a terrible mistake");
>
> calls the constructor
>
> std::logic_error(const std::string&);
>
> which has to construct a string, which might throw std::bad_alloc
>
>
There is also a constructor
explicit logic_error(const char*);
which doesn't have to call a string constructor.
Bo Persson
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to comp.lang.c++.moderated | Previous | Next — Previous in thread | Next in thread | Find similar
C++ exceptions are broken. Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2016-03-08 06:31 -0600
Re: C++ exceptions are broken. "James K. Lowden" <jklowden@speakeasy.net> - 2016-03-09 08:25 -0600
Re: C++ exceptions are broken. Elias Salomão Helou Neto <eshneto@googlemail.com> - 2016-03-12 06:28 -0600
Re: C++ exceptions are broken. Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2016-03-12 14:46 -0600
Re: C++ exceptions are broken. Hergen Lehmann <hlehmann.expires.5-11@snafu.de> - 2016-03-12 16:50 -0600
Re: C++ exceptions are broken. "James K. Lowden" <jklowden@speakeasy.net> - 2016-03-13 15:55 -0600
Re: C++ exceptions are broken. Gareth Owen <gwowen@googlemail.com> - 2016-03-15 08:45 -0600
Re: C++ exceptions are broken. Bo Persson <bop@gmb.dk> - 2016-03-15 12:22 -0600
Re: C++ exceptions are broken. "Alf P. Steinbach" <alf.p.steinbach+usenet@googlemail.com> - 2016-03-17 06:43 -0600
Re: C++ exceptions are broken. Paavo Helde <myfirstname@osa.pri.ee> - 2016-03-17 06:43 -0600
Re: C++ exceptions are broken. Gareth Owen <gwowen@googlemail.com> - 2016-03-15 08:44 -0600
csiph-web