Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

Can anybody with helping me with handling errors in a CLASS that is used by a VB web application? I want to catch the error and either redirect to a page that contains an errorhandler & displays the error, or display a popup window that displays the error.

 

try

try to make db-connection

catch e as exception

... show the error ?? how do I do this in VB with ASP.Net ?? ...

end try

 

Can anybody tell me how to do this?

 

Greetz, Gerard Alberts

  • Moderators
Posted

in your Catch you can Throw an exception to the calling function..

 

Catch e as Exception
Throw new Exception (e.message)

Then in the calling function you can display the error in a label or on the page.

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...