On 24 September 2014 21:11, deadalnix via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Wednesday, 24 September 2014 at 19:28:50 UTC, Andrei > Alexandrescu wrote: >>> >>> However, for sure, the easiest thing that could be done *now* that >>> only needs a slight EH library tweak is using catch-all handlers to >>> recover from any language exception. >>> >>> try { >>> SomeCxxFuncThatMayThrow(); >>> } >>> catch { >>> // Recover, but without knowing what happened. >>> } >>> >>> But I'd imagine you'd actually want information to come with your >>> caught exception, though. :) >> >> >> Well even a catch like that would definitely be an improvement. >> > > Considered it for SDC. it is not that simple as if it is a C++ > exception, you need to do the same cleanup of the exception that > the C++ runtime would do, which is not that simple.
Hmm... I forgot about the C++ compiler emitting function calls for the begin/end of catches. Yeah, that would indeed need to be supported on the compiler side!