Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 4:14
Rick van Woudenberg3-May-11 4:14 
GeneralRe: a try inside another Pin
J4amieC3-May-11 4:36
J4amieC3-May-11 4:36 
GeneralRe: a try inside another Pin
BobJanova3-May-11 4:44
BobJanova3-May-11 4:44 
GeneralRe: a try inside another Pin
J4amieC3-May-11 4:50
J4amieC3-May-11 4:50 
GeneralRe: a try inside another Pin
Pete O'Hanlon3-May-11 5:41
mvePete O'Hanlon3-May-11 5:41 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 23:52
Rick van Woudenberg3-May-11 23:52 
GeneralRe: a try inside another Pin
Gary Wheeler4-May-11 0:44
Gary Wheeler4-May-11 0:44 
GeneralRe: a try inside another Pin
DragonLord664-May-11 6:56
DragonLord664-May-11 6:56 
If you're in a helper layer such as a DAL then you don't want to add any code that will interact with the user, however you may want to do clean up before the exception is thrown up the chain to a level where the exception can be dealt with by the user. Equally what's the difference between the original example and the following?

Private Sub ExceptionMethod()
    Try
        DoExceptionCode()
    Finally
        DoCleanup()
    End Try
End Sub

Private Sub ExceptionHandlerCode()
    Try
        ExceptionMethod()
    Catch ex As Exception
        ExceptionHandlerHere()
    End Try
End Sub

GeneralRe: a try inside another Pin
Pete O'Hanlon4-May-11 7:03
mvePete O'Hanlon4-May-11 7:03 
JokeRe: a try inside another Pin
DragonLord664-May-11 7:11
DragonLord664-May-11 7:11 
GeneralRe: a try inside another Pin
Pete O'Hanlon4-May-11 8:04
mvePete O'Hanlon4-May-11 8:04 
GeneralRe: a try inside another Pin
DragonLord664-May-11 8:06
DragonLord664-May-11 8:06 
GeneralRe: a try inside another Pin
James Lonero4-May-11 12:35
James Lonero4-May-11 12:35 
GeneralRe: a try inside another Pin
V.3-May-11 3:55
professionalV.3-May-11 3:55 
GeneralRe: a try inside another Pin
Pete O'Hanlon3-May-11 4:03
mvePete O'Hanlon3-May-11 4:03 
AnswerRe: a try inside another Pin
Luc Pattyn3-May-11 1:11
sitebuilderLuc Pattyn3-May-11 1:11 
GeneralRe: a try inside another Pin
Ali Al Omairi(Abu AlHassan)3-May-11 1:26
professionalAli Al Omairi(Abu AlHassan)3-May-11 1:26 
GeneralRe: a try inside another Pin
Rick van Woudenberg3-May-11 1:38
Rick van Woudenberg3-May-11 1:38 
GeneralRe: a try inside another Pin
Luc Pattyn3-May-11 2:17
sitebuilderLuc Pattyn3-May-11 2:17 
AnswerRe: a try inside another Pin
BobJanova3-May-11 1:12
BobJanova3-May-11 1:12 
AnswerRe: a try inside another Pin
PIEBALDconsult3-May-11 3:09
mvePIEBALDconsult3-May-11 3:09 
GeneralRe: a try inside another Pin
Luc Pattyn3-May-11 3:26
sitebuilderLuc Pattyn3-May-11 3:26 
GeneralRe: a try inside another Pin
PIEBALDconsult3-May-11 15:05
mvePIEBALDconsult3-May-11 15:05 
GeneralRe: a try inside another Pin
Luc Pattyn3-May-11 15:19
sitebuilderLuc Pattyn3-May-11 15:19 
GeneralRe: a try inside another Pin
PIEBALDconsult3-May-11 15:29
mvePIEBALDconsult3-May-11 15:29 

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.