220 30907 <CAGNvRgAUBUgymJD5UAPMhBDzb1tdzJ-9K+WaT7JyKwEbTkgxQg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= <daniel.kruegler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Try-Catch function
Date: Wed, 15 Feb 2017 18:37:57 +0100
Lines: 33
Approved: news@gmane.org
Message-ID: <CAGNvRgAUBUgymJD5UAPMhBDzb1tdzJ-9K+WaT7JyKwEbTkgxQg@mail.gmail.com>
References: <76d9ab0e-4a74-401d-85ad-327f912a1bb7@isocpp.org>
 <CAGNvRgC_Yqj=mMYXVhOpjFMOAY9OurbeMukmkMtJWqKx9sreBA@mail.gmail.com>
 <CAJe+aq8ZYAXgWTuM6DV6NbaGByrLfoXUEz_q1_hJEWT7YrxEvA@mail.gmail.com>
 <b74c80d1-563c-496b-a47b-d7818af52d2b@isocpp.org> <CAPCFJdS+OFvsnKR8LEGdMODANpWzfUGVaDo8izeNovF2nun=hA@mail.gmail.com>
 <09970ac7-82aa-46cb-91a3-38b55dea503e@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1487180280 27388 195.159.176.226 (15 Feb 2017 17:38:00 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 15 Feb 2017 17:38:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCT7RVFA4QORB5VDSLCQKGQEVJDBNBY@isocpp.org Wed Feb 15 18:37:56 2017
Return-path: <std-proposals+bncBCT7RVFA4QORB5VDSLCQKGQEVJDBNBY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f70.google.com ([74.125.82.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCT7RVFA4QORB5VDSLCQKGQEVJDBNBY@isocpp.org>)
	id 1ce3Wb-0006ex-Gp
	for gclcip-std-proposals@m.gmane.org; Wed, 15 Feb 2017 18:37:53 +0100
Original-Received: by mail-wm0-f70.google.com with SMTP id r141sf16554684wmg.4
        for <gclcip-std-proposals@m.gmane.org>; Wed, 15 Feb 2017 09:37:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=KoZVRVGB2wkYhi5c2IHbjVN7Vfgw7f7yj0phX/9Ipck=;
        b=0aBMxw1int1grQRm/yIwcYb70NRG5HvHGJwO6tzytQNL9aVLwRBWGe9QKVdtqm0B+g
         M5z/JH1HgUgKFZAZoIJHsYb4D1iWinO5LxlS+lX3j23hkjpHMk/hLlY9J7Lj8IGct57X
         EL9F2HSrgpbhYOIImn26GYxFwZ1Wbk8jabc7mNNKeHtQfjfTFkmH2QW2SPqkb/kLGjmV
         IhS+C5IKafeyzZip487T9HnSyXtnmCfP0b6JxjReuxVIGabzflQ+u5Mn5WWJqY7CNKmH
         Dv7I0XqTp1JvUvI++bU+8Ijp+oTX4gWinuocqsP1czQGH9kQlB8hlaxgJoSMHz7GbYWD
         6KxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=KoZVRVGB2wkYhi5c2IHbjVN7Vfgw7f7yj0phX/9Ipck=;
        b=CUoynVcVWdaiJEdxD7ExS1AcXDrusrLHbOEb7nwgOLMv1m7Ay//dGkOz3evSNzUEH7
         afEurqhSaEviELIyoq27Yok8p0LJ42dDlIt0KEWnvD/XKc1HfhjTBTGHKihXsV/Kz+fi
         0640bgAENJBavS1wobR7yXDfR9eQnc6mQmYJRI0s/jRLCtJDw0pU+yqyZLEDKH6ncyMJ
         QtCbuPa/s7LiNErLktsW0vMp6L3wMFqUTBOaGXA9S5d8nZ0b36I6bZQ/eO47/g5kn5fJ
         5HPEUg2kdBLA+4G52BLB3c1Jlsp7aq6bAeJviu0bsKjQGW3xm7c1wn1VkwrpFJqPAqGU
         4Vq 
X-Gm-Message-State: AMke39ny2JyxdRaRHhghYo29AJUp3heGthmprcIQ/wXNwlCX4THoGW/i6adVn7bEUCb87A==
X-Received: by 10.223.131.2 with SMTP id 2mr2025162wrd.5.1487180279399;
        Wed, 15 Feb 2017 09:37:59 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.34.2 with SMTP id i2ls960401wmi.4.canary-gmail; Wed, 15 Feb
 2017 09:37:58 -0800 (PST)
X-Received: by 10.28.131.132 with SMTP id f126mr9379965wmd.61.1487180278129;
        Wed, 15 Feb 2017 09:37:58 -0800 (PST)
Original-Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com. [2a00:1450:400c:c09::231])
        by mx.google.com with ESMTPS id 80si5904403wrc.33.2017.02.15.09.37.58
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 15 Feb 2017 09:37:58 -0800 (PST)
Received-SPF: pass (google.com: domain of daniel.kruegler@gmail.com designates 2a00:1450:400c:c09::231 as permitted sender) client-ip=2a00:1450:400c:c09::231;
Original-Received: by mail-wm0-x231.google.com with SMTP id c85so47945573wmi.1
        for <std-proposals@isocpp.org>; Wed, 15 Feb 2017 09:37:58 -0800 (PST)
X-Received: by 10.28.228.87 with SMTP id b84mr8970445wmh.0.1487180277741; Wed,
 15 Feb 2017 09:37:57 -0800 (PST)
Original-Received: by 10.28.87.72 with HTTP; Wed, 15 Feb 2017 09:37:57 -0800 (PST)
In-Reply-To: <09970ac7-82aa-46cb-91a3-38b55dea503e@isocpp.org>
X-Original-Sender: daniel.kruegler@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 daniel.kruegler@gmail.com designates 2a00:1450:400c:c09::231 as permitted
 sender) smtp.mailfrom=daniel.kruegler@gmail.com;       dmarc=pass (p=NONE
 sp=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:30907
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/30907>

2017-02-15 16:16 GMT+01:00 Nicol Bolas <jmckesson@gmail.com>:
> On Wednesday, February 15, 2017 at 3:59:15 AM UTC-5, Micha=C5=82 Dominiak=
 wrote:
>>
>> As far as I understand, this already exists in the language (and
>> coincidentally is the only way to capture exceptions thrown in a ctor in=
it
>> list).
>
> Not quite. If you use function-level try blocks, the catch blocks are not
> considered part of the function itself. So they cannot `return`; they can
> only `throw`. For some reason, the OP wants to be able to return from the=
m.
> Even though they are declare outside of the function.

The constraint of function-try-blocks that you describe here, relates
to constructors and destructors, not to other functions. The OP's
example involved a no such special member function and the syntax used
for the exception handling is already valid and allows to return
normally.

- Daniel

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAGNvRgAUBUgymJD5UAPMhBDzb1tdzJ-9K%2BWaT7JyKwEbT=
kgxQg%40mail.gmail.com.

.
