Error handling Articles

Exception Handling Changes in C# 2.0

Charlie Calvert asked me to write some C#posts for MSDN C# Developer Center. This article is the first of aseries about the changes from C# 1.0 to C# 2.0. By this I don't meanenhancements (generics, partial classes, etc), but items that wouldeither cause compile errors, create warnings, or change (presumablyimprove) behavior. I haven't seen much […]

Read more

The Use Of InnerException

An unknown error withan unknown description has occurred. Please remain calm while the appropriateauthorities are on their way.Do you recognize these kind oferrors? Ever wondered how you can manage your errors in a way you can track 'mdown from their source to the point you need to show them? The solution issimple. Use the innerexception […]

Read more

Handling Exceptions in C#

Exceptions are errors that may occur duringthe run-time of a program. Exception handling, thus, becomes anintegral part of programming. In C#, exceptions are handled via theException base class. You can also create your own Exception class but,which will, necessarily, derive from the base, inbuilt Exception class. An exception is, for example, a "divide byzero operation", […]

Read more

C# Debugging

Debugging GUI applications for me mostlyconsists of printing out debug statements in the form of a dialog boxwith some text. While this technique was helpful for small to mediumsize apps I find writing large apps with a dialog box popping up afterevery other statement is counterproductive. With this in mind, I setout to find a […]

Read more

C# Exceptions and the Exception Stack

A bit about Exceptions C# has introduced possibly the best tool to use for application error trapping: The exception. An exception is an error condition that is raised whenever your application misbehaves or identifies a problemthat needs to be dealt with right away. This tutorial requires that youhave a basic understanding of C# (or Java) […]

Read more

C# Exception Handling

Definition:"EXCEPTION IS A RUNTIME ERROR WHICH ARISES BECAUSE OF ABNORMALCONDITION INA CODE SEQUENCE. " In C# Exception is a class in the systemnamespace. An object of an exception is that describe the exceptionalconditions occur in a code That means, we are catching an exception,creating an object of it, and then throwing it. C# supports exceptionsin […]

Read more