Skip to main content

JavaScript Errors - Throw and Try to Catch

The try statement allows you to define a block of code to be tested for errors while it is being executed.
The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.
The JavaScript statements try and catch come in pairs.

Syntax

try
  {
  //Run some code here
  }
catch(err)
  {
  //Handle errors here
  }

Comments

Popular posts from this blog

Lotusscript to establish ODBC connection:

The script, when executed from a button, will create a new record in a specified ODBC data source, attempt to save the new record and display a message indicating whether the operation was completed successfully. If the operation is not completed sucessfully, it is likely that either your data source is read-only or your ODBC driver does not permit updates to the data source. Important: Complete each of the four steps below before running the script. 1. Create a new agent and add the following UseLSX command to the Options event: UseLSX "*LSXODBC" 2. Add the following script to the Initialize event of the agent. NOTE: Do not add the 'Sub' and 'End Sub' lines. Dim ui As New NotesUIWorkspace     Dim uidoc As NotesUIDocument     Dim doc As NotesDocument     Dim connection As ODBCConnection     Dim query As ODBCQuery     Dim result As ODBCResultSet         Set uidoc=ui.CurrentDocument ...

Common web based questions in lotus Notes.

1. Which server task is used for Lotus Notes web applications? 2. What are the commands to load and quit the HTTP server task? load http tell http quit restart task http 3. What are the programming language used for web applications? 4. What is pass - thru HTML, how to use it ? Notes rich-text has a feature called 'Pass-thru HTML.' This is text that the Domino server will NOT attempt to format for the web, it will just 'pass it through'. If you create content with a Notes client that gets published to the web, you may wish to use this so you can 'hand-code' your HTML for special effects or some other purpose. 5. What is the difference between pass - thru html and Render pass thru html in Notes ? Check "Render pass through HTML in Notes" in the Form or Page Properties box to have the Notes client process the HTML. If you do not check "Render pass through HTML in Notes," the HTML appears as plain text. 6. What changes are to be done for a Form ...