On 9/29/14 2:43 PM, Jeremy Powers via Digitalmars-d wrote:
On Mon, Sep 29, 2014 at 8:13 AM, Steven Schveighoffer via Digitalmars-d
<digitalmars-d@puremagic.com <mailto:digitalmars-d@puremagic.com>> wrote:
My entire point is, it doesn't matter what is expected or what is
treated as "correct." what matters is where the input CAME from. To
a library function, it has no idea. There is no extra type info
saying "this parameter comes from user input."
From the method's view, parameters passed in are user input. Full stop.
This is missing the point of an exception. An uncaught exception is an error which crashes the program. If you catch the exception, you can handle it, but if you don't expect it, then it's a bug. Any uncaught exceptions are BY DEFINITION programming errors.
What is being discussed here is removing the stack trace and printout when an exception is thrown.
....
Sure, but it doesn't happen. Just like people do not check return values from syscalls.
The benefit of the exception printing is at least you get a trace of where things went wrong when you didn't expect them to. Ignoring a call's return value doesn't give any notion something is wrong until much later.
-Steve