Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Exception Handling

Reply
Thread Tools

Exception Handling

 
 
Robert Smith
Guest
Posts: n/a
 
      04-21-2008
Hi,
Could anyone tell me where would be the best place to deal with
exceptions,
within the form itself or at the lower level within the class that is called
e.g I have a form with the following code

AddAgencyToDb
this.sysAgency.RemoveAgency(IntKey)

then I have a class called sysAgency

public void RemoveAgency(IntKey)
{

// add code to remove agency with intkey

}

Should the try catch be in the form or within the class sysAgency

Thanx
Robert
 
Reply With Quote
 
 
 
 
NH
Guest
Posts: n/a
 
      04-21-2008
I put exception handling in the global.asax file.

But if there is something that I think may go wrong in some specific sub or
piece of code (e.g. in an excel file import routine) I would put more
specific exception handling in that sub.

"Robert Smith" wrote:

> Hi,
> Could anyone tell me where would be the best place to deal with
> exceptions,
> within the form itself or at the lower level within the class that is called
> e.g I have a form with the following code
>
> AddAgencyToDb
> this.sysAgency.RemoveAgency(IntKey)
>
> then I have a class called sysAgency
>
> public void RemoveAgency(IntKey)
> {
>
> // add code to remove agency with intkey
>
> }
>
> Should the try catch be in the form or within the class sysAgency
>
> Thanx
> Robert

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
signal handling and (structured) exception handling Peter C++ 34 10-17-2009 10:03 AM
python list handling and Lisp list handling Mark Tarver Python 22 04-26-2009 09:36 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
SoapExtension for Global Exception handling; but prevent exception from propagating!! VSK ASP .Net Web Services 0 07-29-2003 05:39 PM



Advertisments