You can't make half boiled without breaking eggs and you cannot write code without creating bugs(errors)
but we should work to minimize the impact of these bugs ,aiming for a "zero error count" for this .net support Exception Handling Methodology.
Here we are going to see Try,Catch and Finally..
{
// Statements that are can cause exception
}
catch(Type x)
{
// Statements to handle exception
}
finally
{
// Statement to clean up
}
When error occurs in try block it throw error into catch block,so that we can handle that error, than finally block is used to clean up the statement.
but we should work to minimize the impact of these bugs ,aiming for a "zero error count" for this .net support Exception Handling Methodology.
Here we are going to see Try,Catch and Finally..
Definition:
Exception handling is an in built mechanism in .NET framework to Find and handle run time errors.
try{
// Statements that are can cause exception
}
catch(Type x)
{
// Statements to handle exception
}
finally
{
// Statement to clean up
}
When error occurs in try block it throw error into catch block,so that we can handle that error, than finally block is used to clean up the statement.
No comments:
Post a Comment