Click to See Complete Forum and Search --> : Problem with "on error goto label" code
I'm trying to do the following in an ASP form:
on error goto errhandler
<code>
errhandler:
<error handling code>
I get the following:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/admin/StartCampaign.asp, line 30
on error goto errhandler
--------------^
Can't I use error handler just like in VB. It says so in my ASP book.
Sergey Kats
03-21-2001, 01:35 PM
ASP (VBScript) doesn't support On Error Goto statement
Use
On Error Resume Next
' .....
If Err.Number <> 0 Then
' ERROR
Else
' No error
End If
--
Sergey Kats
http://codebump.net
"Tim" <tboerner@revcon.com> wrote in message
news:3ab8e692$1@news.devx.com...
>
> I'm trying to do the following in an ASP form:
>
>
> on error goto errhandler
>
> <code>
>
> errhandler:
> <error handling code>
>
>
> I get the following:
>
> Microsoft VBScript compilation error '800a03ea'
>
> Syntax error
>
> /admin/StartCampaign.asp, line 30
>
> on error goto errhandler
> --------------^
>
>
>
> Can't I use error handler just like in VB. It says so in my ASP book.
Matthew Solnit
03-21-2001, 05:26 PM
Alternatively, if you are running IIS 5, you can use JScript's Try/Catch syntax.
"Sergey Kats" <sctrl@hotmail.com.spam> wrote in message
news:3ab8f512$1@news.devx.com...
> ASP (VBScript) doesn't support On Error Goto statement
> Use
> On Error Resume Next
> ' .....
> If Err.Number <> 0 Then
> ' ERROR
> Else
> ' No error
> End If
>
> --
> Sergey Kats
> http://codebump.net
>
> "Tim" <tboerner@revcon.com> wrote in message
> news:3ab8e692$1@news.devx.com...
> >
> > I'm trying to do the following in an ASP form:
> >
> >
> > on error goto errhandler
> >
> > <code>
> >
> > errhandler:
> > <error handling code>
> >
> >
> > I get the following:
> >
> > Microsoft VBScript compilation error '800a03ea'
> >
> > Syntax error
> >
> > /admin/StartCampaign.asp, line 30
> >
> > on error goto errhandler
> > --------------^
> >
> >
> >
> > Can't I use error handler just like in VB. It says so in my ASP book.
>
>
devx.com
Copyright Internet.com Inc. All Rights Reserved