Oracle® Business Intelligence Scheduler Guide > Using Oracle BI Scheduler Job Scripts > Oracle BI Scheduler Script Object Methods and Events >

OnError Event


This topic is part of Oracle BI Scheduler Script Object Methods and Events.

Occurs when the script engine encounters a run-time error while executing the script. This is intended for cleanup purposes, but the creative use of try/catch blocks in JScript and proper Error Handling in VBScript are often superior alternatives to using this event.

Usage: The script engine calls this procedure when it encounters a run-time error while executing the script. Define this procedure in your script if you want to perform some cleanup activities before the script terminates, such as deleting temporary files and releasing resources.

Syntax: OnError

Examples
  • Using VBScript:

    Public Sub OnError()
       LogFile.WriteLine "Encountered a runtime error in the script."
    LogFile.Close
    End Sub

  • Using JScript:

    function OnError()
    {
       LogFile.WriteLine("Encountered a runtime error in the
       script.");
    LogFile.Close();

Oracle® Business Intelligence Scheduler Guide Copyright © 2007, Oracle. All rights reserved.