Click here to Skip to main content
15,916,280 members
Home / Discussions / C#
   

C#

 
GeneralRe: Socket and Struct Pin
felopater4-Mar-05 4:50
felopater4-Mar-05 4:50 
GeneralRe: Socket and Struct Pin
James Poulose4-Mar-05 23:17
James Poulose4-Mar-05 23:17 
GeneralNetwork programming Pin
felopater4-Mar-05 1:51
felopater4-Mar-05 1:51 
GeneralRe: Network programming Pin
Colin Angus Mackay4-Mar-05 2:06
Colin Angus Mackay4-Mar-05 2:06 
GeneralRe: Network programming Pin
turbochimp4-Mar-05 11:05
turbochimp4-Mar-05 11:05 
GeneralException Handling - back into method Pin
Seraphin4-Mar-05 1:25
Seraphin4-Mar-05 1:25 
GeneralRe: Exception Handling - back into method Pin
Chamadness4-Mar-05 1:51
Chamadness4-Mar-05 1:51 
GeneralRe: Exception Handling - back into method Pin
Colin Angus Mackay4-Mar-05 2:03
Colin Angus Mackay4-Mar-05 2:03 
Seraphin wrote:
application should continue code processing in the try block

Make your try blocks smaller.

So if you have
try
{
    // Do item 1
    // Do item 2
    // Do item 3
}
catch(Exception ex)
{
    // Handle the exception
}
Change it to:
try
{
    // Do item 1
}
catch(Exception ex)
{
    // Handle the exception
}
try
{
    // Do item 2
}
catch(Exception ex)
{
    // Handle the exception
}
try
{
    // Do item 3
}
catch(Exception ex)
{
    // Handle the exception
}

Or a better solution would be to refactor your code so that item 1, item 2 and item 3 individual private methods that get called, each of which has their own try/catch block.

Does this help?


Cada uno es artifice de su ventura
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums


GeneralA perfect example where goto should be used Pin
leppie4-Mar-05 5:19
leppie4-Mar-05 5:19 
GeneralRe: A perfect example where goto should be used Pin
Dave Kreskowiak4-Mar-05 7:28
mveDave Kreskowiak4-Mar-05 7:28 
GeneralRe: A perfect example where goto should be used Pin
turbochimp4-Mar-05 11:13
turbochimp4-Mar-05 11:13 
GeneralRe: A perfect example where goto should be used Pin
Rob Graham4-Mar-05 11:39
Rob Graham4-Mar-05 11:39 
GeneralRe: A perfect example where goto should be used Pin
turbochimp5-Mar-05 6:10
turbochimp5-Mar-05 6:10 
GeneralRe: A perfect example where goto should be used Pin
leppie4-Mar-05 11:49
leppie4-Mar-05 11:49 
GeneralRe: A perfect example where goto should be used Pin
Dave Kreskowiak4-Mar-05 16:08
mveDave Kreskowiak4-Mar-05 16:08 
GeneralRe: A perfect example where goto should be used Pin
Rob Graham4-Mar-05 17:05
Rob Graham4-Mar-05 17:05 
GeneralRe: A perfect example where goto should be used Pin
turbochimp5-Mar-05 6:12
turbochimp5-Mar-05 6:12 
GeneralC# / Oracle -->Getting ByteArray from field(VARCHAR(250) Pin
Anonymous4-Mar-05 1:03
Anonymous4-Mar-05 1:03 
GeneralCE MAPI problem Pin
ppp0013-Mar-05 23:45
ppp0013-Mar-05 23:45 
GeneralPath to executable for a service Pin
MBAndersen3-Mar-05 23:05
MBAndersen3-Mar-05 23:05 
Generalwant code for add,del,update to db (c#) Pin
chandtec3-Mar-05 22:56
chandtec3-Mar-05 22:56 
GeneralRe: want code for add,del,update to db (c#) Pin
Sebastian Schneider3-Mar-05 22:59
Sebastian Schneider3-Mar-05 22:59 
GeneralRe: want code for add,del,update to db (c#) Pin
Colin Angus Mackay3-Mar-05 23:24
Colin Angus Mackay3-Mar-05 23:24 
GeneralRe: want code for add,del,update to db (c#) Pin
Sebastian Schneider3-Mar-05 23:27
Sebastian Schneider3-Mar-05 23:27 
GeneralRe: want code for add,del,update to db (c#) Pin
J4amieC4-Mar-05 0:14
J4amieC4-Mar-05 0:14 

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.