Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: On Error Resume Next


Message #1 by "Bharat Saboo" <bharatsaboo@h...> on Mon, 11 Feb 2002 14:52:51 +0530
This is a multi-part message in MIME format.



------=_NextPart_000_00F5_01C1B30B.C79AAEE0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi everyone,



can anyone guide me on how to use the error handler in asp.  i would 

ideally like to send the error to a particular email address 

automatically and not let the user see the error in the browser window.  

for this i would have to trap the error and send it to a particular code 

where again i would have to create a mail object (that is all i know 

about emails thru asp).  also please tell me how to create a mail object 

and send the actual mail.



thanks to all in advance



Regards,

Bharat Saboo

  ----- Original Message -----

  From: Steve Holroyd

  To: ASP Web HowTo

  Sent: Saturday, February 09, 2002 10:35 AM

  Subject: [asp_web_howto] Re: Keyword search





  Bill,

  Thanks for your comments....



  Now you ( or someone else who likes my solution ) go solve my problem 

in

  the January archive "Passing Multiple Select Box Choices"



  Cheers








$subst('Email.Unsub').






Message #2 by "Ken Schaefer" <ken@a...> on Mon, 11 Feb 2002 22:13:48 +1100
<%

On Error Resume Next



If Err.Number <> 0 then

    HandleError(Err.Number, Err.Source, Err.Description)

End If

%>



The Err object is an intrinsic VBScript object, you can find out all about

it in the VBScript documentation.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Bharat Saboo" <bharatsaboo@h...>

Subject: [asp_web_howto] On Error Resume Next





can anyone guide me on how to use the error handler in asp.  i would ideally

like to send the error to a particular email address automatically and not

let the user see the error in the browser window.  for this i would have to

trap the error and send it to a particular code where again i would have to

create a mail object (that is all i know about emails thru asp).  also

please tell me how to create a mail object and send the actual mail.



thanks to all in advance



Regards,

Bharat Saboo





Message #3 by "Bharat Saboo" <bharatsaboo@h...> on Mon, 11 Feb 2002 16:53:01 +0530
This is a multi-part message in MIME format.



------=_NextPart_000_0048_01C1B31C.90C880C0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



thnx for the info ken



but i would like to create my own errorhandler so how do i go about it



Regards,

Bharat Saboo

  ----- Original Message -----

  From: Ken Schaefer

  To: ASP Web HowTo

  Sent: Monday, February 11, 2002 4:43 PM

  Subject: [asp_web_howto] Re: On Error Resume Next





  <%

  On Error Resume Next



  If Err.Number <> 0 then

      HandleError(Err.Number, Err.Source, Err.Description)

  End If

  %>



  The Err object is an intrinsic VBScript object, you can find out all 

about

  it in the VBScript documentation.



  Cheers

  Ken



  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  From: "Bharat Saboo" <bharatsaboo@h...>

  Subject: [asp_web_howto] On Error Resume Next





  can anyone guide me on how to use the error handler in asp.  i would 

ideally

  like to send the error to a particular email address automatically and 

not

  let the user see the error in the browser window.  for this i would 

have to

  trap the error and send it to a particular code where again i would 

have to

  create a mail object (that is all i know about emails thru asp).  also

  please tell me how to create a mail object and send the actual mail.



  thanks to all in advance



  Regards,

  Bharat Saboo










$subst('Email.Unsub').






Message #4 by "TomMallard" <mallard@s...> on Mon, 11 Feb 2002 06:44:40 -0800
This is a multi-part message in MIME format.



------=_NextPart_000_0036_01C1B2C7.950A49C0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: 7bit



on error resume next

    ....code which may produce an error

if (Err.Number <> 0) then        'there's an error

    ...error handler...

    strSource = Err.Source

    strDesc = Err.Description

end if



tom mallard

seattle

-----Original Message-----

From: Bharat Saboo [mailto:bharatsaboo@h...]

Sent: Monday, February 11, 2002 3:23 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Re: On Error Resume Next





  thnx for the info ken



  but i would like to create my own errorhandler so how do i go about it



  Regards,

  Bharat Saboo

    ----- Original Message -----

    From: Ken Schaefer

    To: ASP Web HowTo

    Sent: Monday, February 11, 2002 4:43 PM

    Subject: [asp_web_howto] Re: On Error Resume Next





    <%

    On Error Resume Next



    If Err.Number <> 0 then

        HandleError(Err.Number, Err.Source, Err.Description)

    End If

    %>



    The Err object is an intrinsic VBScript object, you can find out all

about

    it in the VBScript documentation.



    Cheers

    Ken



    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    From: "Bharat Saboo" <bharatsaboo@h...>

    Subject: [asp_web_howto] On Error Resume Next





    can anyone guide me on how to use the error handler in asp.  i would

ideally

    like to send the error to a particular email address automatically and

not

    let the user see the error in the browser window.  for this i would have

to

    trap the error and send it to a particular code where again i would have

to

    create a mail object (that is all i know about emails thru asp).  also

    please tell me how to create a mail object and send the actual mail.



    thanks to all in advance



    Regards,

    Bharat Saboo










$subst('Email.Unsub').






$subst('Email.Unsub').






Message #5 by "Drew, Ron" <RDrew@B...> on Mon, 11 Feb 2002 10:51:37 -0500
This is a multi-part message in MIME format.



------_=_NextPart_001_01C1B313.FD2A5FDA

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: quoted-printable



You can setup your own errorhandler as far as what you want to do if an

error occurs, but you still need the basics.  Here is a subroutine

followed by error codes..

<%

On Error Resume Next

'***********************************************************************

***************

'***   Subroutine DisplayError

'***********************************************************************

***************

Sub DisplayError(Connection,errNum,errDesc,errSource,proc)

    Response.Write("<H4 align=3Dcenter> Program Message </h4>")

    Response.Write("VB Error Number: <b>" & errNum & " [0x" &

Hex(errNum) & "]</b>")

    Response.Write("<br>Err.Description: <b>" & errDesc & "</b>")

    Response.Write("<br>Err.Source: <b>" & errSource & "</b>")

    Response.Write("<br>Procedure: <b>" & proc & "</b>")

    Response.Write("<br>Connection errors: <b>" &

Connection.Errors.Count & "</b>")

    If (Connection.Errors.Count > 0) Then

       For Each ErrorMsg in Connection.Errors

           Response.Write("<br>" & ErrorMsg.Description)

       Next

    End If

End Sub

%>

Error Code Message

3 Return Without GoSub

5 Invalid procedure call

6 Overflow

7 Out of memory

9 Subscript out of range

10 Array fixed or temporarily locked

11 Division by zero

13 Type mismatch

14 Out of string space

16 Expression too complex

17 Can't perform requested operation

18 User interrupt occurred

20 Resume without error

28 Out of stack space

35 Sub or Function not defined

47 Too many DLL application clients

48 Error in loading DLL

49 Bad DLL calling procedure

51 Internal error

52 Bad file name or number

53 File not found

54 Bad file mode

55 File already open

57 Device I/O error

58 File already exists

59 Bad record length

61 Disk full

62 Input past end of file

63 Bad record number

67 Too many files

68 Device unavailable

70 Permission denied

71 Disk not ready

74 Can't rename with different drive

75 Path/File access error

76 Path not found

91 Object variable or With block variable not set

92 For loop not initialized

93 Invalid pattern string

94 Invalid use of Null

95 Application-defined or object-defined error

322 Can't create necessary temporary file

325 Invalid format in resource file

380 Invalid property value

423 Property or method not found

424 Object required

429 ActiveX component can't create object

430 Class doesn't support Automation

432 File name or class name not found during Automation operation

438 Object doesn't support this property or method

440 Automation error

442 Connection to type library or object library for remote process has

been lost

443 Automation object does not have a default value

445 Object doesn't support this action

446 Object doesn't support named arguments

447 Object doesn't support current locale setting

448 Named argument not found

449 Argument not optional

450 Wrong number of arguments or invalid property assignment

451 Object not a collection

452 Invalid ordinal

453 Specified DLL function not found

454 Code resource not found

455 Code resource lock error

457 This key already associated with an element of this collection

458 Variable uses an Automation type not supported in VBScript

481 Invalid picture

500 Variable is undefined

501 Can't assign to variable

502 Object not safe for scripting

503 Object not safe for initializing

32811 Element not found



-----Original Message-----

From: TomMallard [mailto:mallard@s...]

Sent: Monday, February 11, 2002 9:45 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Re: On Error Resume Next





on error resume next

    ....code which may produce an error

if (Err.Number <> 0) then        'there's an error

    ...error handler...

    strSource =3D Err.Source

    strDesc =3D Err.Description

end if



tom mallard

seattle

-----Original Message-----

From: Bharat Saboo [mailto:bharatsaboo@h...]

Sent: Monday, February 11, 2002 3:23 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Re: On Error Resume Next







thnx for the info ken



but i would like to create my own errorhandler so how do i go about it



Regards,

Bharat Saboo



----- Original Message -----

From: Ken  <mailto:ken@a...> Schaefer

To: ASP Web HowTo <mailto:asp_web_howto@p...> 

Sent: Monday, February 11, 2002 4:43 PM

Subject: [asp_web_howto] Re: On Error Resume Next



<%

On Error Resume Next



If Err.Number <> 0 then

    HandleError(Err.Number, Err.Source, Err.Description)

End If

%>



The Err object is an intrinsic VBScript object, you can find out all

about

it in the VBScript documentation.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Bharat Saboo" <bharatsaboo@h...>

Subject: [asp_web_howto] On Error Resume Next





can anyone guide me on how to use the error handler in asp.  i would

ideally

like to send the error to a particular email address automatically and

not

let the user see the error in the browser window.  for this i would have

to

trap the error and send it to a particular code where again i would have

to

create a mail object (that is all i know about emails thru asp).  also

please tell me how to create a mail object and send the actual mail.



thanks to all in advance



Regards,

Bharat Saboo










$subst('Email.Unsub')

<mailto:$subst('Email.Unsub')> .








$subst('Email.Unsub').






$subst('Email.Unsub').







  Return to Index