Click here to Skip to main content
15,890,186 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: retrive field value into combobox Pin
Rupesh Kumar Swami5-Feb-09 3:11
Rupesh Kumar Swami5-Feb-09 3:11 
Question[Message Deleted] Pin
εїзεїзεїз5-Feb-09 2:07
εїзεїзεїз5-Feb-09 2:07 
AnswerRe: Grid View Control Pin
Henry Minute5-Feb-09 9:16
Henry Minute5-Feb-09 9:16 
QuestionWhere to put try / catch blocks when dealing with classes Pin
maxnuggets5-Feb-09 0:55
maxnuggets5-Feb-09 0:55 
AnswerRe: Where to put try / catch blocks when dealing with classes Pin
Johan Hakkesteegt5-Feb-09 2:09
Johan Hakkesteegt5-Feb-09 2:09 
GeneralRe: Where to put try / catch blocks when dealing with classes Pin
maxnuggets5-Feb-09 2:22
maxnuggets5-Feb-09 2:22 
GeneralRe: Where to put try / catch blocks when dealing with classes Pin
Johan Hakkesteegt5-Feb-09 3:04
Johan Hakkesteegt5-Feb-09 3:04 
AnswerRe: Where to put try / catch blocks when dealing with classes Pin
riced5-Feb-09 4:43
riced5-Feb-09 4:43 
I don't think there is a general answer to the question.
You need to think about what the class/sub should do if an exception occurs.

Can MyClass do anything meaningful to recover from the exception? If it can then it probably should handle it, if not then don't catch it. (You might want to catch it so you can add additional info to the message and then re-throw the exception.)
If you catch the exception in MyClass what will GetXml do? It won't know the exception happened (unless you re-throw it). The same is true in MyClass if GetXmlFromServer catches the exception.
This will tell you if you actually need exception handling and where it should happen.

You should not use the exception handling mechanism to control program flow, but I'm sure you will see lots of examples where this does happen.

Regards
David R
GeneralRe: Where to put try / catch blocks when dealing with classes Pin
supercat95-Feb-09 6:28
supercat95-Feb-09 6:28 
QuestionModifying a window service Pin
sohaib_a4-Feb-09 22:58
sohaib_a4-Feb-09 22:58 
AnswerRe: Modifying a window service Pin
Dave Kreskowiak5-Feb-09 2:23
mveDave Kreskowiak5-Feb-09 2:23 
Questionvb express list box Pin
steve moorley4-Feb-09 22:49
steve moorley4-Feb-09 22:49 
AnswerRe: vb express list box Pin
Rupesh Kumar Swami4-Feb-09 22:57
Rupesh Kumar Swami4-Feb-09 22:57 
Questioncompiling what was compiled before Pin
Member 42169604-Feb-09 22:36
Member 42169604-Feb-09 22:36 
AnswerRe: compiling what was compiled before Pin
Alan N5-Feb-09 0:25
Alan N5-Feb-09 0:25 
GeneralRe: compiling what was compiled before Pin
Member 42169605-Feb-09 0:40
Member 42169605-Feb-09 0:40 
GeneralRe: compiling what was compiled before Pin
Dave Kreskowiak5-Feb-09 2:20
mveDave Kreskowiak5-Feb-09 2:20 
GeneralRe: compiling what was compiled before Pin
Member 42169605-Feb-09 4:58
Member 42169605-Feb-09 4:58 
GeneralRe: compiling what was compiled before Pin
Dave Kreskowiak5-Feb-09 5:31
mveDave Kreskowiak5-Feb-09 5:31 
GeneralRe: compiling what was compiled before Pin
EliottA5-Feb-09 6:06
EliottA5-Feb-09 6:06 
GeneralRe: compiling what was compiled before Pin
Member 42169605-Feb-09 20:52
Member 42169605-Feb-09 20:52 
GeneralRe: compiling what was compiled before Pin
Dave Kreskowiak6-Feb-09 14:17
mveDave Kreskowiak6-Feb-09 14:17 
GeneralRe: compiling what was compiled before Pin
Member 42169607-Feb-09 0:29
Member 42169607-Feb-09 0:29 
AnswerRe: compiling what was compiled before Pin
Jay Royall5-Feb-09 0:30
Jay Royall5-Feb-09 0:30 
AnswerRe: compiling what was compiled before Pin
EliottA5-Feb-09 5:07
EliottA5-Feb-09 5:07 

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.