C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Try-catch declaration

From: Julien Jorge <julien.jorge_at_[hidden]>
Date: Wed, 22 Nov 2023 14:20:02 +0100
On 22/11/2023 14:01, sasho648 wrote:
> So like:
>
> try(const Foo foo = build_foo()) {
> use_foo(foo); //here exceptions won't be handled by current try-catch
> }
> catch (...) { //handle only the declaration part
> }
>
Mmh well, not useful indeed. Java would catch in the whole block, isn't it?

Received on 2023-11-22 13:20:05