code review based on what I learned from D

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 5 02:39:23 PDT 2015


On 5/07/2015 9:37 p.m., ketmar wrote:
> On Sun, 05 Jul 2015 19:01:59 +1200, Rikki Cattermole wrote:
>
>> Failing gracefully. Not something most developers do.
>
> usually that is not related. i mean that if program entered invalid
> state, it may be too late to save user data. it may be even undesirable
> to do so, as the data may be already corrupted.
>
> what the good program should do (i think) is storing "working log", so if
> it crashed, the log can be replayed from the last saved state, restoring
> all the work. maybe with the option that allows the log to be replayed
> partially, to avoid endless crashes.
>
> besides, it will be possible to send the document and the log to
> developers, so they can reproduce the exact bug.

Of course of course.
Valid options in failing gracefully include resetting the data and 
informing the user. Also giving them an option to send a bug report to 
the devs.
Point being, having it just fail on start each time is not a valid end 
result or something else awful.



More information about the Digitalmars-d-learn mailing list