473,748 Members | 10,737 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error Handling In ASP

Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for
error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i do
special thing when error occured.
For 2. I have to write alot of lines code. I have to control every line.

I wait your opinion.
Thanks alot.

Note: I must use ASP.
Nov 9 '05 #1
8 2255
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:52******** *************** ***********@mic rosoft.com...
Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for
error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i
do
special thing when error occured.
For 2. I have to write alot of lines code. I have to control every line.

I wait your opinion.
Thanks alot.

Note: I must use ASP.

Nov 9 '05 #2
I mean that for example i start a database transaction so an error occured. I
want to rollback transaction with error handling. i can do it in error page
but i think it is not a good way. Because i have to control that is there a
connection and transaction.May be i don't want rollback transaction every
error. Like this...

I hope i can explain what i mean.

"Ray Costanzo [MVP]" wrote:
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:52******** *************** ***********@mic rosoft.com...
Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for
error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i
do
special thing when error occured.
For 2. I have to write alot of lines code. I have to control every line.

I wait your opinion.
Thanks alot.

Note: I must use ASP.


Nov 9 '05 #3
This is not an all or nothing option.

IMO use
http://support.microsoft.com/default...b;en-us;224070 (this is 1.)

It will allow to trap all errors you are not prepared to handle.

I would use 2 on very rare occasion only if I have no way to do it otherwise
(for example you could test for file existance instead of trapping the error
because the file is not available or checking a divider before a division
instead of trapping a divide by zero error). Also 2 is usefull only if your
application could do something about it and if you have a good idea of what
could goes wrong.

So in short I would use option #1 and would perhaps have one or two (or
zero) on error resume next line in the whole application...

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de
news:52******** *************** ***********@mic rosoft.com...
Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for
error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i do special thing when error occured.
For 2. I have to write alot of lines code. I have to control every line.

I wait your opinion.
Thanks alot.

Note: I must use ASP.

Nov 9 '05 #4
How about rolling back the transaction at the database level instead of the
application level? What kind of database?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
I mean that for example i start a database transaction so an error occured.
I
want to rollback transaction with error handling. i can do it in error
page
but i think it is not a good way. Because i have to control that is there
a
connection and transaction.May be i don't want rollback transaction every
error. Like this...

I hope i can explain what i mean.

"Ray Costanzo [MVP]" wrote:
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:52******** *************** ***********@mic rosoft.com...
> Hi to all,
> I want to error handling in ASP. But i think that ASP is not enough for
> error handling. I have got two chance.
> 1. I can prapare an error page and control throught IIS.
> 2. I can use on error resume next.
>
> For 1. This is a general handling. I want to handle local error. Maybe
> i
> do
> special thing when error occured.
> For 2. I have to write alot of lines code. I have to control every
> line.
>
> I wait your opinion.
> Thanks alot.
>
> Note: I must use ASP.


Nov 9 '05 #5
I connect to SQL Server via ADO. I'll use transaction with ADO.

"Ray Costanzo [MVP]" wrote:
How about rolling back the transaction at the database level instead of the
application level? What kind of database?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
I mean that for example i start a database transaction so an error occured.
I
want to rollback transaction with error handling. i can do it in error
page
but i think it is not a good way. Because i have to control that is there
a
connection and transaction.May be i don't want rollback transaction every
error. Like this...

I hope i can explain what i mean.

"Ray Costanzo [MVP]" wrote:
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <Er******@discu ssions.microsof t.com> wrote in message
news:52******** *************** ***********@mic rosoft.com...
> Hi to all,
> I want to error handling in ASP. But i think that ASP is not enough for
> error handling. I have got two chance.
> 1. I can prapare an error page and control throught IIS.
> 2. I can use on error resume next.
>
> For 1. This is a general handling. I want to handle local error. Maybe
> i
> do
> special thing when error occured.
> For 2. I have to write alot of lines code. I have to control every
> line.
>
> I wait your opinion.
> Thanks alot.
>
> Note: I must use ASP.


Nov 9 '05 #6
Thanks alot for opinions. Why don't ASP support label defitiniton like VB.
Like On Error Goto label... It could very useful for me.
"Patrice" wrote:
This is not an all or nothing option.

IMO use
http://support.microsoft.com/default...b;en-us;224070 (this is 1.)

It will allow to trap all errors you are not prepared to handle.

I would use 2 on very rare occasion only if I have no way to do it otherwise
(for example you could test for file existance instead of trapping the error
because the file is not available or checking a divider before a division
instead of trapping a divide by zero error). Also 2 is usefull only if your
application could do something about it and if you have a good idea of what
could goes wrong.

So in short I would use option #1 and would perhaps have one or two (or
zero) on error resume next line in the whole application...

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de
news:52******** *************** ***********@mic rosoft.com...
Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for
error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i

do
special thing when error occured.
For 2. I have to write alot of lines code. I have to control every line.

I wait your opinion.
Thanks alot.

Note: I must use ASP.


Nov 9 '05 #7
Don't know but I'm not really a great "on error" fan. What is the exact
siutation you are facing ? What is the error you would like to handle ? How
frequent it is ?

Start at least with option #1. It will at least allows to see all errors
(the error page could mail you error details).

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de
news:8C******** *************** ***********@mic rosoft.com...
Thanks alot for opinions. Why don't ASP support label defitiniton like VB.
Like On Error Goto label... It could very useful for me.
"Patrice" wrote:
This is not an all or nothing option.

IMO use
http://support.microsoft.com/default...b;en-us;224070 (this is 1.)
It will allow to trap all errors you are not prepared to handle.

I would use 2 on very rare occasion only if I have no way to do it otherwise (for example you could test for file existance instead of trapping the error because the file is not available or checking a divider before a division instead of trapping a divide by zero error). Also 2 is usefull only if your application could do something about it and if you have a good idea of what could goes wrong.

So in short I would use option #1 and would perhaps have one or two (or
zero) on error resume next line in the whole application...

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de news:52******** *************** ***********@mic rosoft.com...
Hi to all,
I want to error handling in ASP. But i think that ASP is not enough for error handling. I have got two chance.
1. I can prapare an error page and control throught IIS.
2. I can use on error resume next.

For 1. This is a general handling. I want to handle local error. Maybe i
do
special thing when error occured.
For 2. I have to write alot of lines code. I have to control every

line.
I wait your opinion.
Thanks alot.

Note: I must use ASP.


Nov 9 '05 #8
Hi Patrice,
Thanks for your help. I'll solve it with number 1.
Thanks a lot again.

er******@hotmai l.com
"Patrice" wrote:
Don't know but I'm not really a great "on error" fan. What is the exact
siutation you are facing ? What is the error you would like to handle ? How
frequent it is ?

Start at least with option #1. It will at least allows to see all errors
(the error page could mail you error details).

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de
news:8C******** *************** ***********@mic rosoft.com...
Thanks alot for opinions. Why don't ASP support label defitiniton like VB.
Like On Error Goto label... It could very useful for me.
"Patrice" wrote:
This is not an all or nothing option.

IMO use
http://support.microsoft.com/default...b;en-us;224070 (this is 1.)
It will allow to trap all errors you are not prepared to handle.

I would use 2 on very rare occasion only if I have no way to do it otherwise (for example you could test for file existance instead of trapping the error because the file is not available or checking a divider before a division instead of trapping a divide by zero error). Also 2 is usefull only if your application could do something about it and if you have a good idea of what could goes wrong.

So in short I would use option #1 and would perhaps have one or two (or
zero) on error resume next line in the whole application...

--
Patrice

"Erencans" <Er******@discu ssions.microsof t.com> a écrit dans le message de news:52******** *************** ***********@mic rosoft.com...
> Hi to all,
> I want to error handling in ASP. But i think that ASP is not enough for > error handling. I have got two chance.
> 1. I can prapare an error page and control throught IIS.
> 2. I can use on error resume next.
>
> For 1. This is a general handling. I want to handle local error. Maybe i do
> special thing when error occured.
> For 2. I have to write alot of lines code. I have to control every line. >
> I wait your opinion.
> Thanks alot.
>
> Note: I must use ASP.


Nov 10 '05 #9

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

Similar topics

2
3271
by: WSeeger | last post by:
When creating a new class, is it encouraged to always include error handling routines within your LET and GET procedures? It's seems that most text books never seem to include much about error handling within classes. Just hoping to hear some programmer's thoughts on error handling.
12
6690
by: Christian Christmann | last post by:
Hi, assert and error handling can be used for similar purposes. When should one use assert instead of try/catch and in which cases the error handling is preferable? I've read somewhere that assert could be used to start an interactive debugger automatically. How do I realize that on a Linux machine using gcc?
6
8462
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order by VisitDt" I'm getting this error message: Errno is 2465. Err.description is "Can't find field '|' referred to in your expression"
13
4484
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently runs into problems on the system where it will actually be used, and since I used so little error-trapping it dies very ungracefully. I will of course try to fix whatever is causing the error and add error-trapping to the functions where the...
21
4414
by: Anthony England | last post by:
Everyone knows that global variables get re-set in an mdb when an un-handled error is encountered, but it seems that this also happens when the variable is defined as private at form-level. So if "global variables get re-set" doesn't tell the whole story, then what does? ***please note*** I'm not looking for a solution - I'm looking for a more detailed description of what happens when an un-handled error occurs - possibly with help file...
3
2858
by: Stefan Johansson | last post by:
Hi all I'am moving from Visual Foxpro and have a question regarding "best practice" error handling in vb .net. In VFP I have always used a "central" error handling object in order to have a easy and reusable way of handling all errors in a program. The VB 6 coding examples I have seen there has always been error handling code in each program module.
4
1938
by: Al Williams | last post by:
Hi, I have error handling in place throughout my application. I also start the application wrapped in error handling code to catch any unexpected exceptions (i.e. exceptions that occur where I haven't placed error handling code). When I run my app from the IDE, the unhandled errors are caught by the error handling code in my Sub Main routine and the error details are logged to a text file and optionally e-mailed to me for follow-up.
10
2293
by: Anthony England | last post by:
(sorry for the likely repost, but it is still not showing on my news server and after that much typing, I don't want to lose it) I am considering general error handling routines and have written a sample function to look up an ID in a table. The function returns True if it can find the ID and create a recordset based on that ID, otherwise it returns false. **I am not looking for comments on the usefulness of this function - it is
0
11595
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access Security, but I'll start with something short and simple This code was written in Access 2003 but should be valid in Access 2000 By default, when you start a new module, either in a form or report, or a global module, Access does not declare Option...
9
3297
by: MrDeej | last post by:
Hello guys! We have an SQL server which sometimes makes timeouts and connection errors. And we have an function witch writes and updates data in 2 tables on this server. When the SQL server error appears it, in 99%, of the cases, works if we just press the play button in VBA debug. Therefor we have maked an error handling which just tryes again. However, as this error handling is difficult to test because of maybe 1 or 2 errors a day, we...
0
8830
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.