Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

on error - continue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elmo Watson - 14 Dec 2007 16:20 GMT
in a Try/Catch block - once an error is thrown, is there any way to set it
so that it will continue through the rest of the procedure?
(in the catch block, I'm firing off an email with the error message)
George Ter-Saakov - 14 Dec 2007 16:37 GMT
Not sure what you mean.Continue?

Let say, If you can not open SQL connection is there any sense to attempt to
run SQL statement?
you have control how to continue by placing your TRY/CATCH statements.

Example

string sNumber = Request["id"];
int iNum = 0;
try
{
   iNum = Int32.Parse(sNumber);
}
catch(Exception e)
{
   ...SEND EMAIL....
}
....continue here....
Print( iNum)

After you caught exception your application will continue. It will just
print 0 if sNumber was not an integer.
So by placing try/catch correctly you can tell compiler what to skip and
what to not.

George.

> in a Try/Catch block - once an error is thrown, is there any way to set it
> so that it will continue through the rest of the procedure?
> (in the catch block, I'm firing off an email with the error message)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.