say if i've got 3 classes like so
WebFrm > UserClass > DBClass
how do i catch an error in the web form when its thrown in the db class i know u can esculate errors but im not sure how 2
many thanks
zee
Printable View
say if i've got 3 classes like so
WebFrm > UserClass > DBClass
how do i catch an error in the web form when its thrown in the db class i know u can esculate errors but im not sure how 2
many thanks
zee
Just don't handle the errors. They should bubble up.
sensible answers on a postcard 2
Dontbesilly
po box need a solution
Answerville
In your web form, add your code that may potentially cause an exception into a try..catch block..
Code:try {
Customer.Add(myCustomer);
}
catch (Exception ex) {
MessageBox.Show(ex.Message);
}