Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Try/Catch Opinions Pin
Pete O'Hanlon23-Nov-11 9:29
mvePete O'Hanlon23-Nov-11 9:29 
AnswerRe: Try/Catch Opinions Pin
Luc Pattyn23-Nov-11 10:26
sitebuilderLuc Pattyn23-Nov-11 10:26 
GeneralRe: Try/Catch Opinions Pin
Pete O'Hanlon23-Nov-11 10:33
mvePete O'Hanlon23-Nov-11 10:33 
GeneralRe: Try/Catch Opinions Pin
Luc Pattyn23-Nov-11 10:56
sitebuilderLuc Pattyn23-Nov-11 10:56 
GeneralRe: Try/Catch Opinions Pin
Pete O'Hanlon23-Nov-11 11:04
mvePete O'Hanlon23-Nov-11 11:04 
GeneralRe: Try/Catch Opinions Pin
Luc Pattyn23-Nov-11 11:11
sitebuilderLuc Pattyn23-Nov-11 11:11 
GeneralRe: Try/Catch Opinions Pin
Eddy Vluggen23-Nov-11 9:27
professionalEddy Vluggen23-Nov-11 9:27 
GeneralRe: Try/Catch Opinions Pin
BillWoodruff24-Nov-11 6:56
professionalBillWoodruff24-Nov-11 6:56 
Pete, this is good solid code (I'd expect no less from you), but in a way I can see this as a bit of a diversion from the original topic: error handling and Try/Catch.

In your code, yes, a Directory will be created, if none exists, but, what about the case it's an error ... for this particular application ... if the user is trying to save a file to a Directory that does not exist ?

And, what about the case where the Directory exists, but is read-only ?

Should code like this be "throwing" errors ? And what, if the code "throws," should be "catching them." And, as Abbott said to Costello: "Who's on first ?"

best, Bill
"... Sturgeon's revelation. It came to him that Science Fiction is indeed ninety-percent crud, but that also—Eureka!—ninety-percent of everything is crud. All things—cars, books, cheeses, hairstyles, people and pins are, to the expert and discerning eye, crud, except for the acceptable tithe which we each happen to like." early 1950's quote from Venture Sci-Fi Magazine on the origin of Sturgeon's Law, by author Theodore Sturgeon: source Oxford English Dictionary on-line "Word-of-the-Day."

GeneralRe: Try/Catch Opinions Pin
Pete O'Hanlon30-Nov-11 5:33
mvePete O'Hanlon30-Nov-11 5:33 
GeneralRe: Try/Catch Opinions Pin
Eddy Vluggen23-Nov-11 7:51
professionalEddy Vluggen23-Nov-11 7:51 
GeneralRe: Try/Catch Opinions Pin
jschell25-Nov-11 9:03
jschell25-Nov-11 9:03 
AnswerRe: Try/Catch Opinions Pin
Eddy Vluggen25-Nov-11 10:08
professionalEddy Vluggen25-Nov-11 10:08 
GeneralRe: Try/Catch Opinions Pin
jschell25-Nov-11 12:36
jschell25-Nov-11 12:36 
GeneralRe: Try/Catch Opinions Pin
Ennis Ray Lynch, Jr.23-Nov-11 8:34
Ennis Ray Lynch, Jr.23-Nov-11 8:34 
GeneralRe: Try/Catch Opinions Pin
PIEBALDconsult23-Nov-11 8:37
mvePIEBALDconsult23-Nov-11 8:37 
GeneralRe: Try/Catch Opinions Pin
Luc Pattyn23-Nov-11 10:25
sitebuilderLuc Pattyn23-Nov-11 10:25 
GeneralRe: Try/Catch Opinions Pin
jschell25-Nov-11 9:01
jschell25-Nov-11 9:01 
GeneralRe: Try/Catch Opinions Pin
emardini27-Nov-11 16:38
emardini27-Nov-11 16:38 
QuestionManage Services On Another PC/Server Pin
Kevin Marois23-Nov-11 6:59
professionalKevin Marois23-Nov-11 6:59 
AnswerRe: Manage Services On Another PC/Server Pin
Matt U.23-Nov-11 9:26
Matt U.23-Nov-11 9:26 
GeneralRe: Manage Services On Another PC/Server Pin
Kevin Marois23-Nov-11 10:16
professionalKevin Marois23-Nov-11 10:16 
QuestionC# Find and Replace Pin
stefanere2k923-Nov-11 6:02
stefanere2k923-Nov-11 6:02 
AnswerRe: C# Find and Replace Pin
BobJanova23-Nov-11 6:16
BobJanova23-Nov-11 6:16 
AnswerRe: C# Find and Replace Pin
PIEBALDconsult23-Nov-11 7:26
mvePIEBALDconsult23-Nov-11 7:26 
SuggestionRe: C# Find and Replace Pin
Nevin Janzen23-Nov-11 7:30
Nevin Janzen23-Nov-11 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.