Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Error Handling In ASP

Reply
Thread Tools

Error Handling In ASP

 
 
Erencans
Guest
Posts: n/a
 
      11-09-2005
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.
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      11-09-2005
What do you mean by local error? What's the question here?

Ray at work

"Erencans" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
Erencans
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      11-09-2005
How about rolling back the transaction at the database level instead of the
application level? What kind of database?

Ray at work

"Erencans" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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.

>>
>>
>>



 
Reply With Quote
 
Erencans
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > 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.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Erencans
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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.

>
>
>

 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      11-09-2005
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> a écrit dans le message

de
> > news:(E-Mail Removed)...
> > > 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.

> >
> >
> >



 
Reply With Quote
 
Erencans
Guest
Posts: n/a
 
      11-10-2005
Hi Patrice,
Thanks for your help. I'll solve it with number 1.
Thanks a lot again.

http://www.velocityreviews.com/forums/(E-Mail Removed)


"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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> a écrit dans le message

> de
> > > news:(E-Mail Removed)...
> > > > 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.
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
signal handling and (structured) exception handling Peter C++ 34 10-17-2009 10:03 AM
python list handling and Lisp list handling Mark Tarver Python 22 04-26-2009 09:36 PM
Is faster handling hexadecimal values than handling chars? Iñaki Baz Castillo Ruby 1 04-15-2008 09:04 AM
ASP/ASP.NET error handling lorenzo.viscanti@gmail.com ASP .Net 2 10-18-2005 10:08 AM
error handling in database in asp.net basha ASP .Net 1 11-02-2003 03:41 PM



Advertisments