re:how to capture error

Results 1 to 2 of 2

Thread: re:how to capture error

  1. #1
    yls Guest

    Default re:how to capture error

    &#060;% <BR>Err.Clear <BR>On Error Resume Next <BR>Server.CreateObject("whatever") <BR>If Err.Number &#060;&#062; 0 Then <BR> Response.Write "Creating the &#039whatever&#039 object caused error: " & Err.Description <BR>End If <BR>On Error GoTo 0 <BR>%&#062; <BR><BR>hi, i was thinking of capturing ALL errors by writing a sub procedure so that i can reuse the code here and then? whats your opinion?

  2. #2
    Join Date
    Dec 1969

    Default RE: re:how to capture error

    Yep,<BR><BR>Good thinking yls.<BR><BR>Anytime you have a regular operation that can be standardised into 1 sub / function call then it should be done.<BR><BR>Rather than writing a lengthy spiel advocating the advantages of this approach, check out this article:<BR><BR><BR><BR><BR>HTH<BR><BR>Darre n<BR>[ ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts