473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2238
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <Er******@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.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.Maybe 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******@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.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******@discussions.microsoft.com> a écrit dans le message de
news:52**********************************@microsof t.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******@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.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.Maybe 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******@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.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******@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.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.Maybe 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******@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.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******@discussions.microsoft.com> a écrit dans le message de
news:52**********************************@microsof t.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******@discussions.microsoft.com> a écrit dans le message de
news:8C**********************************@microsof t.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******@discussions.microsoft.com> a écrit dans le message de news:52**********************************@microsof t.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******@hotmail.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******@discussions.microsoft.com> a écrit dans le message de
news:8C**********************************@microsof t.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******@discussions.microsoft.com> a écrit dans le message de news:52**********************************@microsof t.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
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...
12
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...
6
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...
13
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...
21
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...
3
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...
4
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...
10
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...
0
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...
9
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.