Click here to Skip to main content
15,914,447 members
Home / Discussions / C#
   

C#

 
GeneralRe: uncaught exception handlers Pin
George_George30-Apr-08 4:00
George_George30-Apr-08 4:00 
GeneralRe: uncaught exception handlers Pin
Derek Bartram30-Apr-08 4:54
Derek Bartram30-Apr-08 4:54 
GeneralRe: uncaught exception handlers Pin
George_George30-Apr-08 5:09
George_George30-Apr-08 5:09 
GeneralRe: uncaught exception handlers Pin
MidwestLimey28-Apr-08 6:54
professionalMidwestLimey28-Apr-08 6:54 
GeneralRe: uncaught exception handlers Pin
George_George29-Apr-08 2:30
George_George29-Apr-08 2:30 
GeneralRe: uncaught exception handlers Pin
MidwestLimey29-Apr-08 4:38
professionalMidwestLimey29-Apr-08 4:38 
GeneralRe: uncaught exception handlers Pin
George_George29-Apr-08 5:00
George_George29-Apr-08 5:00 
GeneralRe: uncaught exception handlers Pin
Spacix One29-Apr-08 5:44
Spacix One29-Apr-08 5:44 
I think he means the use of the
try
{
}
catch...

WITHOUT an Exception being thrown has little to no effect on code. The problem is when Exceptions do occur it slows everything down. Though I think that is better than the WHOLE app crashing to a grinding halt and a .NET error message dialog showing then the Microsoft error reporting tool (if enabled) poping up.

Though this has been stated many times in this thread, using exceptions to contol logic is VERY VERY bad code:
public static bool someMethod()
{
    try
    {
        //code process
        if(somthing wrong)
        {
             throw new Exception("Error!!");
        }
    }
    catch(Exception err)
    {
        return false;
    }
}

There are only a few exceptions(pun intended) to this rule and anytime I've seen something like the code as above wasn't needed...


-Spacix
All your skynet questions[^] belong to solved

GeneralRe: uncaught exception handlers Pin
MidwestLimey29-Apr-08 11:43
professionalMidwestLimey29-Apr-08 11:43 
GeneralRe: uncaught exception handlers Pin
George_George29-Apr-08 19:58
George_George29-Apr-08 19:58 
GeneralRe: uncaught exception handlers Pin
Spacix One2-May-08 5:18
Spacix One2-May-08 5:18 
GeneralRe: uncaught exception handlers Pin
George_George2-May-08 21:29
George_George2-May-08 21:29 
GeneralRe: uncaught exception handlers Pin
MidwestLimey29-Apr-08 11:42
professionalMidwestLimey29-Apr-08 11:42 
GeneralRe: uncaught exception handlers Pin
George_George29-Apr-08 19:59
George_George29-Apr-08 19:59 
GeneralRe: uncaught exception handlers Pin
Derek Bartram30-Apr-08 5:23
Derek Bartram30-Apr-08 5:23 
GeneralRe: uncaught exception handlers Pin
George_George26-Apr-08 21:23
George_George26-Apr-08 21:23 
GeneralRe: uncaught exception handlers Pin
George_George26-Apr-08 21:14
George_George26-Apr-08 21:14 
GeneralRe: uncaught exception handlers Pin
Derek Bartram27-Apr-08 0:12
Derek Bartram27-Apr-08 0:12 
GeneralRe: uncaught exception handlers Pin
George_George27-Apr-08 2:08
George_George27-Apr-08 2:08 
GeneralRe: uncaught exception handlers Pin
Derek Bartram30-Apr-08 1:49
Derek Bartram30-Apr-08 1:49 
GeneralRe: uncaught exception handlers Pin
George_George30-Apr-08 3:58
George_George30-Apr-08 3:58 
GeneralRe: uncaught exception handlers Pin
Derek Bartram30-Apr-08 4:54
Derek Bartram30-Apr-08 4:54 
GeneralRe: uncaught exception handlers Pin
George_George30-Apr-08 5:08
George_George30-Apr-08 5:08 
GeneralRe: uncaught exception handlers Pin
PIEBALDconsult27-Apr-08 4:37
mvePIEBALDconsult27-Apr-08 4:37 
GeneralRe: uncaught exception handlers Pin
Derek Bartram27-Apr-08 6:56
Derek Bartram27-Apr-08 6:56 

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.