You technically can with a small workaround (demonstrated below), though I personally wouldn't use this approach.
void foo() { auto value = [] { try { return Foo(); } catch (...) { // Something here } }(); value.do_something(); }
auto value = try Foo("will fail") catch(...) { return Foo("will work"); // or throw something else };
You technically can with a small workaround (demonstrated below), though I personally wouldn't use this approach.