More exception classes into Phobos?

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 23 04:29:39 PDT 2017


On Thursday, 23 March 2017 at 11:15:45 UTC, Георгий wrote:
> On Thursday, 23 March 2017 at 11:09:33 UTC, Jonathan M Davis 
> wrote:
>>
>> If something isn't implemented, it's a bug. assert(0) is a 
>> great way to indicate that something isn't implemented yet and 
>> have the program die (like it should) if that function 
>> inadvertently gets called.
>
> I don't agree. On the web, in production, even if this is a bug,
> the page may down, the request may down, but not entire 
> application.

And more importantly, the server should return a HTTP status 
indicating that there was a problem and that the request should 
not be repeated. Just silently dying does not work as well in a 
bigger setting where you want other services to adapt.




More information about the Digitalmars-d mailing list