Create a Syntax Editor Macro
- Navigate to System Definition > Syntax Editor Macros.
- Create a new macro:
Name: try Comment: Client-side try/catch Text:
try{ } catch(err){ g_form.addErrorMessage("A runtime error occured: " + err); }
- Select Submit
- Open the Lab 1.1 Using the Syntax Editor Client Script. Place the cursor on a new line below the existing script
- Test the try / catch macro by typing try and pressing the <tab> key.
- Place the cursor on a new line below existing script, type help and press the <tab> key
- Syntax errors will prevent a save at this time, comment out or delete the help macro text
- Select Update to save the changes and close the record