ReportFailure

<< Click to Display Table of Contents >>

 

ReportFailure

ReportFailure(FailureName, FailureDescription, FailureWeight)

This method allows an application to report failures to a Server, which can be viewed by right-clicking Elipse Power's icon on Windows Notification area. When this method is used, Elipse Power's icon on Windows Notification Area starts blinking in red, indicating that a failure occurred. Reported failures are usually conditions preventing an application from working partially (problems with communication on a serial port, inactive network link, database without connection, etc.), and that usually cannot be detected by a Server. This method can be used in two situations:

To warn a system operator about problems in a server

To help the automatic Hot-Standby manager to decide which server is more suitable to execute an application

 

NOTE

The ReportFailure method is only available in the Server.

 

The ReportFailure method contains the parameters described on the next table.

Parameters of the ReportFailure method

Name

Description

FailureName

Contains the failure name (user-defined). This parameter must be passed to the ClearFailure method when the application detects that this failure is no longer active. For example, "FaultCOM1"

FailureDescription

Textual description of the failure (user-defined). For example, "Communication failure at COM1"

FailureWeight

Defines a failure's severity (or weight). A value of 0 (zero) indicates a warning (no severity). Values greater than zero indicate failures. The greater the value, the severer the failure

 

Example:

Sub TagSerialStatus_OnValueChanged()
  If Value Then
    ' The tag value is True, application is on error
    Application.ReportFailure "FAULT_COM1", _
      "Communication fault at COM1", 100
  Else
    ' The tag value is False, clears the failure
    Application.ClearFailure "FAULT_COM1"
  End If
End Sub

Was this page useful?