|
..."Handled with exceptions". What does that even mean? Does it mean we use try...catch to detect the problems and fail gracefully? Or that we generate the exceptions and pass them on up? Or (in the case of user input errors for example) that we should rely on exceptions to report problems?
Because I catch some, throw some, and check user input to prevent exceptions happening.
So I had to go for "Which of the following issues are best handled using Exceptions? CListCtrl and LiquidNitrogen" because Bacon should be the Rule, not the Exception.
Waddayamean there isn't an option for that?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'm also confused about what "handled with exceptions" means. So I just checked all of them.
Generally as a rule of thumb I catch ALL exceptions at the highest level possible to prevent the application to crash. There might be an occasional try-catch-block to handle specific cases and also the occasional exception I throw myself (e.g. during parameter validation).
I think exceptions are pretty useful to control the program flow in case where it doesn't go the way I expected or intended it to.
|
|
|
|
|
Nicholas Marty wrote: I'm also confused about what "handled with exceptions" means. So I just checked all of them.
I ended up checking all of them except User Input Validation. Invalid content there should always be expected, never exceptional, meaning that you should always check for it pre-emptively.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Well, as it was formulated as "Invalid data supplied by the user" instead of "user input validation" and I have no idea in which context this was meant to be, I still checked it.
Who is that "user"? An end user actually using your frontend? Then I agree to not use exceptions to validate the input. But there are other types of users. And an example where I actually used exceptions to validate input is a WCF Service where I throw FaultExceptions in case the user supplies invalid data.
|
|
|
|