Error handling (Definition)

A mechanism for dealing with errors.

Error handling in compiled languages happens in two stages.

First, compile time messages tell you about syntax errors. Secondly, when you run the application, you get run-time errors. These are generally semantic problems.

JavaScript is an interpreted language and as such compilation and run-time happen one after the other when the script is executed. Some implementations parse and tokenize the entire script before executing any of it, others may parse and execute a line at a time.

If you are handling errors in server-side code, you may be able to make use of the following methods/properties of the Netscape Enterprise Server's server-side objects. These will tell you about errors that have just occurred:

The status codes returned by NES database calls imply that you should inspect these error code values when the status code is 5 or 7 (depending on the database type).


See also:Connection.majorErrorCode(), Connection.majorErrorMessage(), Connection.minorErrorCode(), Connection.minorErrorMessage(), Constraint, database.majorErrorCode(), database.majorErrorMessage(), database.minorErrorCode(), database.minorErrorMessage(), DbPool.majorErrorCode(), DbPool.majorErrorMessage(), DbPool.minorErrorCode(), DbPool.minorErrorMessage(), Diagnostic message, Input-output, JellyScript, Script termination, Status code