Let's improve D's exceptions

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Thu May 14 05:26:43 PDT 2015


I wonder if enforce should throw an Error instead, if it exists 
at all. Because it's designed to throw an exception you shouldn't 
catch. If you are going to have it throw an Exception subclass, 
then it should take the exception type, like 
enforce!WhateverException(...), or something.


More information about the Digitalmars-d mailing list