DIAdemヘルプ

Method: RaiseError for ContextFinalize <Analysis Automation>

  • 更新日2024-09-12
  • 3分で読める

Method: RaiseError for ContextFinalize <Analysis Automation>

Terminates the On_Finalize event with an error message without executing further commands.

Object.RaiseError(errNumber, message)
ObjectContextFinalize <Analysis Automation>
Object with this method
errNumberLongInteger
Specifies the error number.
messageString
Specifies the error text.

The following examples aborts the script with an error message when the parameter for the result path is missing:

VBScriptPython

 

Sub On_Finalize(oContext)
  Dim ResultsPath, oMyArguments
  Set oMyArguments = oContext.Procedure.Arguments
  If oMyArguments.Exists("ResultsPath") Then
    ResultsPath = oMyArguments.Item("ResultsPath").Value
    Call oContext.LogResult("Results path: " & ResultsPath)
  Else
    Call oContext.RaiseError(1,"Results path missing")
  End If
End Sub