|
-
Sep 12th, 2003, 10:11 AM
#1
Thread Starter
Lively Member
Error handling
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
-
Sep 12th, 2003, 10:48 AM
#2
PowerPoster
Just don't handle the errors. They should bubble up.
-
Sep 12th, 2003, 10:50 AM
#3
Thread Starter
Lively Member
sensible answers on a postcard 2
Dontbesilly
po box need a solution
Answerville
-
Sep 12th, 2003, 11:47 AM
#4
PowerPoster
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);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|