Program logic bugs vs input/environmental errors
Sean Kelly via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 28 12:33:35 PDT 2014
On Sunday, 28 September 2014 at 17:33:38 UTC, Walter Bright wrote:
> On 9/28/2014 9:23 AM, Sean Kelly wrote:
>> Also, I think the idea that a program is created and shipped
>> to an end user is overly simplistic. In the server/cloud
>> programming world, when an error occurs, the client who
>> submitted the request will get a response appropriate for them
>> and the system will also generate log information intended for
>> people working on the system. So things like stack traces and
>> assertion failure information is useful even for production
>> software. Same with any critical system, as I'm sure you're
>> aware. The systems are designed to handle failures in
>> specific ways, but they also have to leave a breadcrumb trail
>> so the underlying problem can be diagnosed and fixed.
>> Internal testing is never perfect, and achieving a high
>> coverage percentage is nearly impossible if the system wasn't
>> designed from the ground up to be testable in such a way (mock
>> frameworks and such).
>
> Then use assert(). That's just what it's for.
What if I don't want to be forced to abort the program in the
event of such an error?
More information about the Digitalmars-d
mailing list