Element Details: If+Error
 Back


Available in: Logi Info Source code name: IfError

IfError helps handle errors while running Procedures. Errors include events such as failure to update a database, run a report, save a file. Without IfError elements, the system returns an error page detailing the original error.

Add Procedure and Response elements under the IfError to perform error-handling work.

IfErrors can be added at the Procedure, Task, and Process levels, and all three. Errors "bubble up" until an IfError is found. If a Procedure fails, and that Procedure does not have its own child IfError element, the system looks up at the Task element for an IfError. If not found, the top level Process element is checked.

When bubbling up, once a Procedure's IfError has already been used, it will not be re-used, thus preventing the possibility of infinite loops.

If there are no Response elements under an IfError, execution resumes with the element following the failed procedure. Thus an error can be completely ignored by not adding any child elements below the IfError.

You may include error handling within error handling. An error might occur in a Procedure under an IfError. You may have additional IfError elements under that Procedure. Otherwise, the error will bubble-up to the Task and Process levels.

In order to perform different actions based on different errors, IfError has an ErrorFilter attribute. Add an IfError for each different type of error. The server looks for the first IfError that matches the current error. Usually the last IfError should have a blank ErrorFilter to catch left-over errors.

There are two ways to get error message text. For a specific Procedure, use "@Procedure.ProceduredID.ErrorMessage~". (Replace "ProcedureID" with the ID of the Procedure that failed.) For any procedure, use "@Function.LastErrorMessage~".

Element Group:Logic



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
ErrorFilter
UserDefined
Error Filter allows individual IfError elements to handle different errors. Set the Error Filter to any text found within the Error message. If the text is found, the IfError will handle the error. Otherwise, if there is one, the next IfError element will be checked. Leave Error Filter blank to process all errors.
ID
UserDefined
UserDefined
(Required) The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.



PARENT ELEMENTS

Click element to drill down for more information.

File.Compress
Procedure.Compress File
Procedure.Compress Folder
Procedure.Copy File
Procedure.Create Folder
Procedure.Data
Procedure.Delete File
Procedure.Delete Folder
Procedure.Else
Procedure.Export CSV
Procedure.Export Native Excel
Procedure.Export Native Word
Procedure.Export PDF
Procedure.Export XML
Procedure.File Exists
Procedure.Folder Exists
Procedure.If
Procedure.Mongo Insert
Procedure.Mongo Remove
Procedure.Mongo Run Command
Procedure.Mongo Update
Procedure.Plugin Call
Procedure.PredictToSql
Procedure.REST
Procedure.Run Datalayer Rows
Procedure.Run DataTable Rows
Procedure.RunShellCommand
Procedure.Save Analysis Grid
Procedure.Save Chart Grid
Procedure.Save Dimension Grid
Procedure.Save File Upload
Procedure.Save HTML
Procedure.Save Olap Grid
Procedure.Save Template
Procedure.Scheduler Create Task
Procedure.Scheduler Delete Task
Procedure.Scheduler Run Task
Procedure.Scheduler Update Task
Procedure.Script
Procedure.Send Html Report
Procedure.Send Mail
Procedure.Send SMS Text Message
Procedure.Send Tweet
Procedure.Set Cookie Vars
Procedure.Set Procedure Vars
Procedure.Set Session Vars
Procedure.SimpleDB Add Domain
Procedure.SimpleDB Delete Domain
Procedure.SimpleDB Delete Item
Procedure.SimpleDB Insert Item
Procedure.SimpleDB Update Item
Procedure.SP
Procedure.SQL
Procedure.Switch
Procedure.Switch Case
Procedure.Switch Else
Procedure.Train Prediction Model
Procedure.UnCompress File
Procedure.UnCompress Folder
Procedure.Web Service
Procedure.Xml Modifier
Process
Task


CHILD ELEMENTS

Click element to drill down for more information.

If
Procedure.Copy File
Procedure.Create Folder
Procedure.Data
Procedure.Delete File
Procedure.Delete Folder
Procedure.Else
Procedure.Export CSV
Procedure.Export Native Excel
Procedure.Export Native Word
Procedure.Export PDF
Procedure.Export XML
Procedure.File Exists
Procedure.Folder Exists
Procedure.If
Procedure.Mongo Insert
Procedure.Mongo Remove
Procedure.Mongo Run Command
Procedure.Mongo Update
Procedure.Plugin Call
Procedure.Process Task
Procedure.REST
Procedure.Run Datalayer Rows
Procedure.Run DataTable Rows
Procedure.RunShellCommand
Procedure.Save Analysis Grid
Procedure.Save Chart Grid
Procedure.Save Dimension Grid
Procedure.Save File Upload
Procedure.Save HTML
Procedure.Save Olap Grid
Procedure.Save Template
Procedure.Script
Procedure.Send Html Report
Procedure.Send Mail
Procedure.Send SMS Text Message
Procedure.Send Tweet
Procedure.Set Cookie Vars
Procedure.Set Procedure Vars
Procedure.Set Session Vars
Procedure.SP
Procedure.SQL
Procedure.Switch
Procedure.Web Service
Procedure.Xml Modifier
Response.Exit
Response.Link
Response.Raw
Response.Report
Response.Template


 Back to top


 Chart Debug