Method: LogError for ContextInitialize <Analysis Automation>
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: LogError for ContextInitialize <Analysis Automation>
Method: LogError for ContextInitialize <Analysis Automation>
Creates an error. The analysis automation continues the script but marks the file in the analysis automation as failed.
Object.LogError(message)
| Object | ContextInitialize <Analysis Automation> Object with this method |
| message | String Specifies the error text. |
The following example marks the processed file as defective when the parameter for the result path is missing:
| VBScript | Python |
Sub On_Initialize(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.LogError("Resultpath missing") End If End Sub