Checked vs unchecked exceptions
    Ola Fosheim Grøstad via Digitalmars-d 
    digitalmars-d at puremagic.com
       
    Mon Jun 26 08:40:40 PDT 2017
    
    
  
On Monday, 26 June 2017 at 15:15:54 UTC, Steven Schveighoffer 
wrote:
> void foo()
> {
>    try {
>      functionWithException();
>    } catch(Exception e) {} // shut up compiler
> }
>
> So it ends up defeating the purpose. The exception is not 
> properly handled, either inside or outside the function.
That's a poor argument, this will be caught in code reviews. You 
might as well use the same argument against returning error codes 
or optionals. Yes, it is possible to ignore them… and?
    
    
More information about the Digitalmars-d
mailing list