Saturday, October 16, 2010

Expection Handling

Programmer Question

catch (Exception ex)
{
DBGlobals.Error("OHMjson.Graph.saveLastGraphName - Error: " + ex.getMessage());
msg = "Unable to save data";
status = false;
}


This piece of code would throw an status as false, if i encounter an error.



Instead should i thrown New expection.
Is this the right way.
How can i handle exception in a better way.



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails