473,569 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

on error - continue

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)

Dec 14 '07 #1
1 1999
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(sNu mber);
}
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.
"Elmo Watson" <sm@here.comwro te in message
news:ex******** ********@TK2MSF TNGP03.phx.gbl. ..
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)

Dec 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2611
by: Bob Bedford | last post by:
I've an insert statement that takes datas from XML files. Sometimes, for some reasons, the XML file get corrupted. If it's the case, the script crashes and it doesn't continue, even if the following items are ok. How to let the script continue, even if there is an "insert" error (or any error). I won't my script to stop. I will be able to...
8
2040
by: Toni | last post by:
Hello I'm a newbie in VB .NET and I'd like to accomplish a (I think) very simple task. What I want to do is throw an error message to the user whenever something happens. The main point is that the message must stop the code execution, but it sholud not close the application nor show the classical exception window (the one with JIT...
2
2356
by: Petar Popara | last post by:
This is from Event Viewer. What is it? Error: Script Engine Exception. A ScriptEngine threw expection 'C0000005' in 'IActiveScript::SetScriptState()' from 'CActiveScriptEngine::ResetToUninitialized()'.. For additional information specific to this message please visit the
38
2507
by: Red Dragon | last post by:
I am self study C student. I got stuck in the program below on quadratic equation and will be most grateful if someone could help me to unravel the mystery. Why does the computer refuse to execute my scanf ("%c",&q); On input 3 4 1 (for a,b and c) I had real roots OK On input 1 8 16 I had same real roots OK. However on 4 2 ...
5
3916
by: Matthew Hood | last post by:
I have a DLL I created to handle all unknown errors using the Application.ThreadException event. I'm asking the user if they want to terminate the program or continue. This is working like I want. The program exits when I tell it to terminate, and when I continue, the program keeps running but the routine that generated the error exited. I...
0
334
by: Sandy | last post by:
HI All, I have created a MFC exe using VC++ .NET 2003 on Windows XP Prof service pack 2 and it works properly on my machine, but when I run the same exe on a different machine (Windows XP Prof SP-2), The application is bought up and after some time its throwing a windows xp error dialog
9
2941
by: i | last post by:
#include<stdio.h> #include<conio.h> #include<process.h> #include<string.h> char ch; int n,m; void main(); char check(int,int,char); void cash(int,int,char); void debit_card(int,int,char);
2
2450
by: vijayrvs | last post by:
SearchCrawler.java The program search crawler used to search the files from the website. From the following program i got 7 compiler error. can any body clarify it and provide me solution. import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; import java.util.*;
3
5054
by: broll911 | last post by:
I am gettin a error message on this script can someone help me. I am a complete newbie on this stuff. Thanks in advance for any help you can give me. here is the error. Parse error: syntax error, unexpected T_VARIABLE in /home/content/m/i/x/mixxsalon/html/FormToEmail.php on line 1 here is the code. <?php $my_email = "user@example.com";...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.