Example:
Is it possible to define my own exception type?
Consider i have my own custom method in code behind or BL or DA layer :
public void my_first_method()
{
// some custom code execution..
//might throw some errors..
}
//so.. if am not wrong..
//can i have something in my event handler like..
try
{
my_first_method();
my_second_method();
my_third_method();
}
catch(my_first_methodException fex)
{
}
catch(my_second_methodException sex)
{
}
catch(my_third_methodException tex)
{
}
catch(Exception ex)
{
//if doesn't belongs to above 3 exception come here..
}
I am trying to find out whether this is possible. Please advise. Thanks in advance.