Home > On Error > Asp Javascript On Error Resume Next

Asp Javascript On Error Resume Next


Herong Yang Board index » jscript All times are UTC On Error Resume Next in JS On Error Resume Next in JS Author Message XXL#1 / 3 On Error Resume When you think ASP, think... It would take a lot of work to address all possible exceptions. JavaScript / JScript is designed to have an encapsulated error handling system that uses try, catch and finally blocks to handle errors (much as you would handle in a 'proper' application get redirected here

Errors can be coding errors made by the programmer, errors due to wrong input, and other unforeseeable things. Quote:> which is the equivalent of "On Error Goto xxx" in JS Wed, 09 Mar 2005 08:23:01 GMT Etan Bukie#3 / 3 On Error Resume Next in JS window.onerror = Top 10 Tutorials HTML Tutorial CSS Tutorial JavaScript Tutorial W3.CSS Tutorial Bootstrap Tutorial SQL Tutorial PHP Tutorial jQuery Tutorial Angular Tutorial XML Tutorial Top 10 References HTML Reference CSS Reference JavaScript Here is my code

Session("objConn") = "";
Session("objRS") = "";
Session("objConn") = Server.CreateObject("ADODB.Connection");
Session("objConn").ConnectionString = "DSN=CCPR;uid=sa"

if (Session("objConn").Errors.Count > 0)
// An error ocurred trying to connect to

Classic Asp On Error Resume Next

An exception is an error that occurs at runtime due to an illegal operation during execution. I have modified the VBScript example used in the previous section to try to check the "Err" object by myself with the error handling flag turned on: