By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Error Handling In ASP

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.