logException

Adds a new Application Log entry for the specified message and exception object at the ERROR level and returns the resulting message string.

Syntax

logException(msg, exception);

Parameters

  • msg - (String) Message to add to log entry, in the format:
    • “Error message: %eMsg% more message text”

      where %eMsg% is an optional token that is replaced with the message of the exception parameter. If %eMsg% is omitted, the exception message is added to the msg parameter string.

      If exception.getMessage() is defined, this exception message is used. Else if exception.message is defined, this exception message is used. Otherwise (or if exception is omitted), the exception message used is: “Unknown Exception Type”

  • exception - (Object) An exception object.

Returns

  • String - The exception message written to the Application Log.