https://issues.dlang.org/show_bug.cgi?id=12558

Nick Treleaven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Nick Treleaven <[email protected]> ---
(In reply to Andrej Mitrovic from comment #3)
> (In reply to yebblies from comment #2)
> > I dunno, catching asserts like that is useful.  Why shouldn't the default be
> > to catch absolutely everything?
> 
> Because you're potentially drowning a serious error and it's really hard to
> spot this in the code. 

Indeed, and we recommend *not* to catch Error. Doing it silently hides
important bugs.

> But we already have library workarounds for exactly this purpose, e.g.
> collectException!Throwable( your_stuff_here );

or just:
catch(Throwable){...}

Perhaps we could add a compiler warning for catch without an explicit type.

--

Reply via email to