Error Handling

Results 1 to 2 of 2

Thread: Error Handling

  1. #1
    Join Date
    Dec 1969

    Default Error Handling

    Hi all<BR><BR>I want to get rid of crappy OLE errors as they are no use to anyone.<BR><BR>I am aware of the old error handling vbscript chestnut - <BR>&#060;% On Error Resume Next %&#062;<BR><BR>Any ideas on how to get this to work in Javascript ASP?<BR>I have heard of &#039;catch&#039; and &#039;try&#039; etc. but this only seems to work on client side script errors.<BR><BR>Any ideas would be gratefully appreciated.<BR><BR>cheers.<BR><BR>Wangstein "Been trying for 4 hours" Suction.

  2. #2
    Join Date
    Dec 1969

    Default Try and Catch are the way to go. ...

    ... However, they&#039;re not supported on JScript (that&#039;s what the server uses in ASP - JavaScript is client side) before version 5, so if you&#039;re server is a little older, then it won&#039;t work.<BR><BR>In this case, there is a very ugly work-around. You can write your code in JScript and then call it from VBScript, provided the JScript code is put into functions. Then you can use the VBScript On Error handling to check for errors.<BR><BR>As I said: THIS IS A VERY UGLY WORK-AROUND ONLY!!<BR><BR>Oliver.

Posting Permissions

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