/* eslint-disable no-console */ //Disables the "Unexpected console statement" warnings. function RunClientCode(){ try { //Write custom code here... null.MyInvalidFunctionCall(); } //Catches errors such as the following: //1) ReferenceError: FunctionXXX is not defined //2) TypeError: g_form.FunctionXXX is not a function //3) TypeError: Cannot read properties of null (reading 'MyFunction') catch (err) { var sMessage = "Error caught by catch block: " + err.toString(); g_form.addErrorMessage(sMessage); //alert(sMessage); console.warn(sMessage); } }