Jump to page: 1 244  
Page
Thread overview
Program logic bugs vs input/environmental errors
Sep 27, 2014
Walter Bright
Sep 27, 2014
bearophile
Sep 27, 2014
Walter Bright
Sep 27, 2014
H. S. Teoh
Sep 28, 2014
Walter Bright
Sep 28, 2014
Timon Gehr
Sep 28, 2014
Walter Bright
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Walter Bright
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Walter Bright
Sep 29, 2014
Walter Bright
Sep 29, 2014
Sean Kelly
Sep 29, 2014
Walter Bright
Sep 29, 2014
Sean Kelly
Sep 29, 2014
Walter Bright
Sep 29, 2014
Sean Kelly
Oct 04, 2014
Walter Bright
Sep 29, 2014
Paolo Invernizzi
Sep 29, 2014
Sean Kelly
Sep 29, 2014
Paolo Invernizzi
Sep 29, 2014
Sean Kelly
Oct 01, 2014
Bruno Medeiros
Oct 01, 2014
bearophile
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 04, 2014
Sean Kelly
Oct 08, 2014
Bruno Medeiros
Oct 04, 2014
Walter Bright
Oct 04, 2014
Marc Schütz
Oct 04, 2014
Walter Bright
Oct 04, 2014
Sean Kelly
Oct 04, 2014
Walter Bright
Oct 05, 2014
Dicebot
Oct 05, 2014
Walter Bright
Oct 05, 2014
Dicebot
Oct 05, 2014
Walter Bright
Oct 05, 2014
Sean Kelly
Oct 06, 2014
Walter Bright
Oct 06, 2014
Dicebot
Oct 07, 2014
Walter Bright
Oct 07, 2014
H. S. Teoh
Oct 07, 2014
Timon Gehr
Oct 07, 2014
Walter Bright
Oct 07, 2014
Timon Gehr
Oct 07, 2014
Walter Bright
Oct 07, 2014
Timon Gehr
Oct 08, 2014
Walter Bright
Oct 08, 2014
Timon Gehr
Oct 08, 2014
Walter Bright
Oct 08, 2014
Timon Gehr
Oct 09, 2014
Dicebot
Oct 09, 2014
Johannes Pfau
Oct 09, 2014
Iain Buclaw
Oct 09, 2014
Dicebot
Oct 09, 2014
Marc Schütz
Oct 09, 2014
Dicebot
Oct 11, 2014
Walter Bright
Oct 15, 2014
Dicebot
Oct 15, 2014
Walter Bright
Oct 15, 2014
Dicebot
Oct 15, 2014
Walter Bright
Oct 15, 2014
Jacob Carlborg
Oct 15, 2014
Walter Bright
Oct 15, 2014
Ary Borenszweig
Oct 15, 2014
Dicebot
Oct 15, 2014
eles
Oct 16, 2014
Dan Olson
Oct 16, 2014
monnoroch
Oct 16, 2014
Sean Kelly
Oct 16, 2014
Jacob Carlborg
Oct 16, 2014
Dicebot
Oct 16, 2014
Walter Bright
Oct 16, 2014
Dicebot
Oct 16, 2014
Sean Kelly
Oct 16, 2014
Walter Bright
Oct 16, 2014
Dicebot
Oct 17, 2014
Atila Neves
Oct 17, 2014
Jacob Carlborg
Oct 18, 2014
Walter Bright
Oct 17, 2014
Jacob Carlborg
Oct 18, 2014
Walter Bright
Oct 18, 2014
Jacob Carlborg
Oct 16, 2014
Walter Bright
Oct 15, 2014
Dan Olson
Oct 16, 2014
Walter Bright
Oct 16, 2014
Dan Olson
Oct 16, 2014
Walter Bright
Oct 17, 2014
Dan Olson
Oct 17, 2014
Jacob Carlborg
Oct 16, 2014
Sean Kelly
Mathematical rounding
Oct 16, 2014
Elena
Oct 16, 2014
Walter Bright
Oct 16, 2014
Sean Kelly
Oct 16, 2014
Walter Bright
Oct 16, 2014
Sean Kelly
Oct 16, 2014
Walter Bright
Oct 17, 2014
Jacob Carlborg
Oct 18, 2014
Walter Bright
Oct 18, 2014
Jacob Carlborg
Oct 18, 2014
Walter Bright
Oct 20, 2014
eles
Oct 21, 2014
rst256
Oct 22, 2014
rst256
Oct 22, 2014
eles
Oct 20, 2014
Timon Gehr
Oct 20, 2014
Walter Bright
Oct 23, 2014
rst256
Oct 22, 2014
w0rp
Oct 22, 2014
eles
Oct 29, 2014
Bruno Medeiros
Oct 29, 2014
Walter Bright
Oct 30, 2014
Jacob Carlborg
Nov 01, 2014
Kagamin
Nov 02, 2014
Walter Bright
Nov 07, 2014
Bruno Medeiros
Nov 09, 2014
Dicebot
Nov 09, 2014
Walter Bright
Nov 09, 2014
eles
Nov 09, 2014
eles
Nov 19, 2014
Bruno Medeiros
Nov 19, 2014
Walter Bright
Oct 18, 2014
Sean Kelly
Oct 18, 2014
Walter Bright
Oct 20, 2014
rst256
Oct 11, 2014
Walter Bright
Oct 03, 2014
Brad Roberts
Oct 03, 2014
Sean Kelly
Oct 08, 2014
Bruno Medeiros
Oct 10, 2014
Marco Leise
Oct 10, 2014
Brad Roberts
Oct 11, 2014
Dicebot
Oct 04, 2014
Walter Bright
Oct 05, 2014
Marco Leise
Oct 04, 2014
ketmar
Oct 04, 2014
Paolo Invernizzi
Oct 04, 2014
ketmar
Oct 04, 2014
Brad Roberts
Oct 04, 2014
ketmar
Oct 04, 2014
eles
Oct 04, 2014
ketmar
Oct 04, 2014
eles
Oct 04, 2014
ketmar
Oct 04, 2014
eles
Oct 04, 2014
ketmar
Oct 05, 2014
Walter Bright
Oct 05, 2014
Cliff
Oct 05, 2014
ketmar
Oct 05, 2014
Cliff
Oct 05, 2014
ketmar
Oct 05, 2014
ketmar
Oct 04, 2014
Walter Bright
Oct 04, 2014
ketmar
Oct 04, 2014
eles
Oct 04, 2014
ketmar
Oct 04, 2014
Nick Sabalausky
Sep 29, 2014
Walter Bright
Sep 29, 2014
Timon Gehr
Sep 29, 2014
Timon Gehr
Sep 29, 2014
Johannes Pfau
Sep 29, 2014
Daniel N
Sep 29, 2014
ketmar
Sep 29, 2014
ketmar
Sep 28, 2014
Walter Bright
Sep 28, 2014
H. S. Teoh
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Cliff
Sep 28, 2014
Walter Bright
Sep 29, 2014
Timon Gehr
Sep 29, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Sep 29, 2014
Johannes Pfau
Sep 29, 2014
Walter Bright
Oct 01, 2014
Bruno Medeiros
Sep 27, 2014
bearophile
Sep 28, 2014
Walter Bright
Sep 28, 2014
Walter Bright
Sep 29, 2014
Walter Bright
Sep 28, 2014
Jacob Carlborg
Sep 29, 2014
Walter Bright
Sep 29, 2014
Jacob Carlborg
Sep 29, 2014
Jeremy Powers
Sep 29, 2014
Jeremy Powers
Oct 01, 2014
Bruno Medeiros
Oct 01, 2014
Bruno Medeiros
Oct 01, 2014
Paolo Invernizzi
Oct 01, 2014
Andrej Mitrovic
Sep 29, 2014
Jeremy Powers
Sep 29, 2014
Sean Kelly
Sep 29, 2014
Jeremy Powers
Sep 30, 2014
Jeremy Powers
Re: Program logic bugs vs input/environmental errors (checked exceptions)
Oct 01, 2014
Bruno Medeiros
Oct 01, 2014
Jeremy Powers
Oct 01, 2014
Sean Kelly
Oct 01, 2014
David Nadlinger
Oct 02, 2014
Jacob Carlborg
Oct 03, 2014
David Nadlinger
Oct 03, 2014
Jacob Carlborg
Oct 05, 2014
Marco Leise
Oct 05, 2014
Jacob Carlborg
Oct 05, 2014
Dicebot
Oct 05, 2014
Walter Bright
Oct 05, 2014
Dmitry Olshansky
Oct 06, 2014
Jacob Carlborg
Oct 06, 2014
Dmitry Olshansky
Oct 06, 2014
H. S. Teoh
Oct 06, 2014
Jeremy Powers
Oct 07, 2014
Jeremy Powers
Oct 07, 2014
Jeremy Powers
Oct 06, 2014
Jacob Carlborg
Oct 06, 2014
Jacob Carlborg
Oct 06, 2014
Jacob Carlborg
Oct 07, 2014
Jacob Carlborg
Oct 06, 2014
Regan Heath
Oct 06, 2014
Jacob Carlborg
Oct 02, 2014
Jacob Carlborg
Oct 01, 2014
Jacob Carlborg
Oct 02, 2014
Jacob Carlborg
Oct 04, 2014
Jacob Carlborg
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 05, 2014
Tobias Müller
Oct 05, 2014
Marco Leise
Oct 05, 2014
ketmar
Oct 05, 2014
Marco Leise
Sep 28, 2014
ketmar
Sep 28, 2014
luka8088
Sep 28, 2014
bearophile
Sep 28, 2014
Walter Bright
Sep 28, 2014
bearophile
Sep 28, 2014
Walter Bright
Sep 28, 2014
luka8088
Sep 28, 2014
Jacob Carlborg
Sep 28, 2014
Walter Bright
Oct 01, 2014
Marco Leise
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Ary Borenszweig
Sep 28, 2014
Xiao Xie
Sep 28, 2014
Walter Bright
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Walter Bright
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Dmitry Olshansky
Sep 28, 2014
Sean Kelly
Sep 28, 2014
Dmitry Olshansky
Sep 28, 2014
Walter Bright
Sep 29, 2014
Sean Kelly
Sep 29, 2014
Walter Bright
Oct 03, 2014
Kagamin
Oct 03, 2014
Jacob Carlborg
Oct 03, 2014
Sean Kelly
Oct 03, 2014
Piotrek
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 04, 2014
eles
Oct 04, 2014
H. S. Teoh
Oct 04, 2014
Walter Bright
Oct 04, 2014
Timon Gehr
Oct 04, 2014
Nick Sabalausky
Oct 04, 2014
Nick Sabalausky
Oct 05, 2014
Walter Bright
Oct 05, 2014
Walter Bright
Oct 05, 2014
Paolo Invernizzi
Oct 05, 2014
Paolo Invernizzi
Oct 05, 2014
Nick Sabalausky
Oct 07, 2014
Nick Sabalausky
Oct 07, 2014
Mike Parker
Oct 07, 2014
Nick Sabalausky
Oct 07, 2014
Mike Parker
Oct 07, 2014
Walter Bright
Oct 07, 2014
Nick Sabalausky
Oct 07, 2014
Nick Sabalausky
Oct 07, 2014
Timon Gehr
Oct 08, 2014
H. S. Teoh
Oct 08, 2014
Timon Gehr
Oct 08, 2014
eles
Oct 08, 2014
eles
Oct 08, 2014
Nick Sabalausky
Oct 08, 2014
eles
Oct 08, 2014
Walter Bright
Oct 08, 2014
Nick Sabalausky
Oct 08, 2014
eles
Oct 10, 2014
Iain Buclaw
Oct 10, 2014
eles
Oct 11, 2014
Nick Sabalausky
Oct 15, 2014
Walter Bright
Nov 02, 2014
Walter Bright
Oct 10, 2014
eles
Oct 08, 2014
ketmar
Oct 08, 2014
eles
Oct 08, 2014
eles
Oct 07, 2014
Walter Bright
Oct 07, 2014
Nick Sabalausky
Oct 08, 2014
Walter Bright
Oct 08, 2014
Nick Sabalausky
Oct 07, 2014
Walter Bright
Oct 05, 2014
Tobias Müller
Oct 05, 2014
Walter Bright
Oct 05, 2014
eles
Oct 05, 2014
Walter Bright
Oct 03, 2014
Piotrek
Oct 03, 2014
Sean Kelly
Oct 03, 2014
Paolo Invernizzi
Oct 03, 2014
Piotrek
Oct 04, 2014
Paolo Invernizzi
Oct 04, 2014
Piotrek
Oct 04, 2014
Walter Bright
Oct 04, 2014
Piotrek
Oct 04, 2014
eles
Oct 14, 2014
eles
Oct 27, 2014
eles
Oct 04, 2014
Walter Bright
Oct 04, 2014
Paolo Invernizzi
Oct 04, 2014
Piotrek
Oct 04, 2014
eles
Oct 04, 2014
eles
Oct 04, 2014
Walter Bright
Oct 04, 2014
eles
Oct 04, 2014
Sean Kelly
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 15, 2014
Kagamin
Oct 16, 2014
Walter Bright
Oct 17, 2014
Kagamin
Oct 31, 2014
Kagamin
Oct 31, 2014
H. S. Teoh
Oct 31, 2014
Kagamin
Oct 31, 2014
H. S. Teoh
Oct 31, 2014
Walter Bright
Nov 01, 2014
Walter Bright
Nov 01, 2014
Dicebot
Nov 01, 2014
H. S. Teoh
Nov 02, 2014
Dicebot
Nov 02, 2014
Walter Bright
Nov 02, 2014
Dicebot
Nov 03, 2014
Walter Bright
Nov 03, 2014
Sean Kelly
Nov 03, 2014
Walter Bright
Nov 09, 2014
Dicebot
Nov 09, 2014
Walter Bright
Nov 12, 2014
Walter Bright
Nov 11, 2014
Kagamin
Nov 01, 2014
Kagamin
Nov 01, 2014
Walter Bright
Oct 01, 2014
Bruno Medeiros
Oct 04, 2014
Walter Bright
Oct 04, 2014
Piotrek
Oct 04, 2014
Walter Bright
Oct 04, 2014
Walter Bright
Oct 08, 2014
Bruno Medeiros
Oct 10, 2014
Walter Bright
Oct 01, 2014
Bruno Medeiros
Oct 04, 2014
Walter Bright
Oct 05, 2014
Marco Leise
Oct 22, 2014
rst256
Oct 24, 2014
Ary Borenszweig
Oct 24, 2014
H. S. Teoh
Oct 31, 2014
Kagamin
Oct 31, 2014
H. S. Teoh
Nov 01, 2014
Kagamin
Nov 01, 2014
H. S. Teoh
Oct 24, 2014
Walter Bright
Oct 27, 2014
Sean Kelly
Oct 29, 2014
Walter Bright
September 27, 2014
This issue comes up over and over, in various guises. I feel like Yosemite Sam here:

    https://www.youtube.com/watch?v=hBhlQgvHmQ0

In that vein, Exceptions are for either being able to recover from input/environmental errors, or report them to the user of the application.

When I say "They are NOT for debugging programs", I mean they are NOT for debugging programs.

assert()s and contracts are for debugging programs.

After all, what would you think of a compiler that spewed out messages like this:

   > dmd test.d
   test.d(15) Error: missing } thrown from dmd/src/parse.c(283)

?

See:

    https://issues.dlang.org/show_bug.cgi?id=13543

As for the programmer wanting to know where the message "missing }" came from,

    grep -r dmd/src/*.c "missing }"

works nicely. I do that sort of thing all the time. It really isn't a problem.
September 27, 2014
Walter Bright:

> As for the programmer wanting to know where the message "missing }" came from,
>
>     grep -r dmd/src/*.c "missing }"
>
> works nicely. I do that sort of thing all the time. It really isn't a problem.

grep is not useful for the purposes explained in issue 13543 because the file name is often inside a string variable, that is initialized elsewhere or generated in some way. So the exception is useful to know where's the instruction in user code that has tried the failed I/O action, as I've explained in that issue.

Bye,
bearophile
September 27, 2014
On 9/27/2014 4:33 PM, bearophile wrote:
> Walter Bright:
>
>> As for the programmer wanting to know where the message "missing }" came from,
>>
>>     grep -r dmd/src/*.c "missing }"
>>
>> works nicely. I do that sort of thing all the time. It really isn't a problem.
>
> grep is not useful for the purposes explained in issue 13543 because the file
> name is often inside a string variable, that is initialized elsewhere or
> generated in some way. So the exception is useful to know where's the
> instruction in user code that has tried the failed I/O action, as I've explained
> in that issue.

Even if that is what you wanted, you won't get that from FileException, as it will only show file/lines emanating from calls inside std.file, not from higher level callers.

Besides, take a bit of care when formulating a string for exceptions, and you won't have any trouble grepping for it. This isn't rocket science.

Presenting internal debugging data to users for input/environmental errors is just bad programming practice. We shouldn't be enshrining it in Phobos and presenting it as a professional way to code.

September 27, 2014
On Sat, Sep 27, 2014 at 04:42:18PM -0700, Walter Bright via Digitalmars-d wrote:
> On 9/27/2014 4:33 PM, bearophile wrote:
> >Walter Bright:
> >
> >>As for the programmer wanting to know where the message "missing }" came from,
> >>
> >>    grep -r dmd/src/*.c "missing }"
> >>
> >>works nicely. I do that sort of thing all the time. It really isn't a problem.
> >
> >grep is not useful for the purposes explained in issue 13543 because the file name is often inside a string variable, that is initialized elsewhere or generated in some way. So the exception is useful to know where's the instruction in user code that has tried the failed I/O action, as I've explained in that issue.
> 
> Even if that is what you wanted, you won't get that from FileException, as it will only show file/lines emanating from calls inside std.file, not from higher level callers.
> 
> Besides, take a bit of care when formulating a string for exceptions, and you won't have any trouble grepping for it. This isn't rocket science.
> 
> Presenting internal debugging data to users for input/environmental errors is just bad programming practice. We shouldn't be enshrining it in Phobos and presenting it as a professional way to code.

My take on this, is that uncaught exceptions are a program bug. Any messages displayed to the user ought to come from a catch block that not only prints the exception message (*without* things like line numbers and stack traces, btw), but also provides context (e.g., "Error in configuration file section 'abc': illegal field value" instead of just "illegal field value" with no context of where it might have been triggered).

Uncaught exceptions (which ideally should only be Errors, not Exceptions) are a program bug that ought to be fixed. In the case that somehow one managed to elude your catch blocks, the full debug infodump (source file, line number, stack trace) is useful for users to hand back to you in a bug report, so that you can track down the problem. The user should not be expected to understand the infodump from an uncaught exception, whereas a message printed from a catch block ought to be user-understandable (like "can't open 'myphoto.jpg': file not found", not "internal error on line 12345" which makes no sense to a user).


T

-- 
Laissez-faire is a French term commonly interpreted by Conservatives to mean 'lazy fairy,' which is the belief that if governments are lazy enough, the Good Fairy will come down from heaven and do all their work for them.
September 27, 2014
Walter Bright:

> Even if that is what you wanted, you won't get that from FileException, as it will only show file/lines emanating from calls inside std.file, not from higher level callers.

Can't we use the template arguments like __LINE__ to offer the line of code in the IO function in user code?


> Besides, take a bit of care when formulating a string for exceptions, and you won't have any trouble grepping for it. This isn't rocket science.

The exception is generated inside library code, not in user code. There's nothing to grep in the user code. The D script often looks like this:

void main() {
    import std.stdio;
    auto file_name = "some_file;
    // some code here
    auto file_name1 = file_name ~ "1.txt";
    auto f1 = File(file_name1);
    // some code here
    auto file_name2 = file_name ~ "2.txt";
    auto f2 = File(file_name2, "w");
    // some code here
}


> Presenting internal debugging data to users for input/environmental errors is just bad programming practice.7 We shouldn't be enshrining it in Phobos and presenting it as a professional way to code.

The file/line of code is not meant to replace serious practices for dealing with I/O failures in serious D programs.

Bye,
bearophile
September 28, 2014
On 9/27/2014 4:55 PM, H. S. Teoh via Digitalmars-d wrote:
> My take on this, is that uncaught exceptions are a program bug.

Not to me. Custom messages would be better, but the exception message should be serviceable.


> Uncaught exceptions (which ideally should only be Errors, not
> Exceptions) are a program bug that ought to be fixed. In the case that
> somehow one managed to elude your catch blocks, the full debug infodump
> (source file, line number, stack trace) is useful for users to hand back
> to you in a bug report, so that you can track down the problem. The user
> should not be expected to understand the infodump from an uncaught
> exception, whereas a message printed from a catch block ought to be
> user-understandable (like "can't open 'myphoto.jpg': file not found",
> not "internal error on line 12345" which makes no sense to a user).

Whoa, Camel! You're again thinking of Exceptions as a debugging tool.

September 28, 2014
On 9/27/2014 4:59 PM, bearophile wrote:
> Walter Bright:
>
>> Even if that is what you wanted, you won't get that from FileException, as it
>> will only show file/lines emanating from calls inside std.file, not from
>> higher level callers.
>
> Can't we use the template arguments like __LINE__ to offer the line of code in
> the IO function in user code?

We could, but again, WHOA CAMEL!

Also, one should be careful in using __LINE__ in a template, as it will be forced to generate a new instantiation with every use.


>> Besides, take a bit of care when formulating a string for exceptions, and you
>> won't have any trouble grepping for it. This isn't rocket science.
>
> The exception is generated inside library code, not in user code. There's
> nothing to grep in the user code. The D script often looks like this:
>
> void main() {
>      import std.stdio;
>      auto file_name = "some_file;
>      // some code here
>      auto file_name1 = file_name ~ "1.txt";
>      auto f1 = File(file_name1);
>      // some code here
>      auto file_name2 = file_name ~ "2.txt";
>      auto f2 = File(file_name2, "w");
>      // some code here
> }

Come on. What is hard about "Cannot open file `xxxx` in mode `xxxx`", then you grep for "Cannot open file" ?

Let's try it:

  > grep "Cannot open file" *.d
  stdio.d:      text("Cannot open file `", name, "' in mode `",
  stdio.d://    new StdioException("Cannot open file `"~fName~"' for reading"));
  stdio.d://    new StdioException("Cannot open file `"~fName~"' for reading"));

Besides, File doesn't throw a FileException and doesn't add caller's __FILE__ and __LINE__.

If you're seriously proposing adding __FILE__ and __LINE__ to every function call, then D is the wrong language. This would have disastrous bloat and performance problems. You mentioned Python and Ruby, both of which are well known for miserable performance.

Building the equivalent of a symbolic debugger into RELEASED D code is just not acceptable.


>> Presenting internal debugging data to users for input/environmental errors is
>> just bad programming practice.7 We shouldn't be enshrining it in Phobos and
>> presenting it as a professional way to code.
>
> The file/line of code is not meant to replace serious practices for dealing with
> I/O failures in serious D programs.

That's exactly what you're doing with it.

September 28, 2014
On 09/28/2014 02:40 AM, Walter Bright wrote:
> On 9/27/2014 4:55 PM, H. S. Teoh via Digitalmars-d wrote:
>> My take on this, is that uncaught exceptions are a program bug.
>
> Not to me. ...

It is not worth fixing if a program terminates with a stack trace?

September 28, 2014
On 9/27/2014 5:54 PM, Timon Gehr wrote:
> On 09/28/2014 02:40 AM, Walter Bright wrote:
>> On 9/27/2014 4:55 PM, H. S. Teoh via Digitalmars-d wrote:
>>> My take on this, is that uncaught exceptions are a program bug.
>>
>> Not to me. ...
>
> It is not worth fixing if a program terminates with a stack trace?
>

I never was in favor of adding the stack trace output, either, for the same reason. Exceptions are not programming bugs.

For Errors, a case can be made for them.
September 28, 2014
On 9/27/14 7:15 PM, Walter Bright wrote:

> When I say "They are NOT for debugging programs", I mean they are NOT
> for debugging programs.

Library code often cannot make that choice. The issue with exceptions vs. errors is that often you don't know where the input comes from.

e.g.:

auto f = File(someInternalStringThatIsCorrupted) -> error
auto f = File(argv[1]) -> exception

How does File know what it's target file name came from?

-Steve
« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11