Greg Lorriman
Re: Exceptions vs Error codes

Re: Exceptions vs Error codes


> Absolutely not! I am saying that it is unreasonable for MS Word to do
> anything other than abort if the user provides a false path in the open
> dialog. What is the programmer supposed to do?

PMFJI...but I agree with Kristofer.  In the case you describe, MS provides
an informational message saying that the file path is invalid and then
offers a suggestion to correct the problem.  This type of action does not
require exception handling to accomplish.  When you acknowledge the message
with the OK button, the program takes you right to where you left off to try

I don't think that the need for user intervention automatically means exception handling. For one thing, I have had to clean up code where the developer passes the cryptic exception message up to the user, who then has to call for tech support...and no one wins.
Also, I think there are too many cases where info or error message explains to the user exactly what to do, where instead the program could have done that task instead. Even in the example above, if you give a program an invalid path, did the user have the opportunity to input a default path so that this can be used? Can the MRU be more helpful?
FYI: Phrase searches are enclosed in either single or double quotes
Originally created by
Tamarack Associates
Sun, 03 Mar 2024 23:43:49 UTC
Copyright © 2009-2024
HREF Tools Corp.