No error encounter on modern activities

If you intentionally make a selector error in your UiPath automation workflow and you are not seeing an error being thrown, there could be a few reasons for this behavior:

  1. Try-Catch Configuration: First, ensure that the Try-Catch activity is correctly configured. The sequence inside the “Try” block should contain the activity with the incorrect selector, and the “Catch” block should contain the actions you want to perform when an exception occurs.
  2. Exception Type: Check the type of exception you are catching in the Catch block. If you are catching a specific type of exception (e.g., UiPath.Core.SelectorNotFoundException), ensure that the error you are intentionally causing matches the exception type you are trying to catch. If the exception type does not match, the catch block will not execute.
  3. Error Handling Settings: Verify the error handling settings for the activity. By default, some activities may be configured to “ContinueOnError,” which means that they will not throw an exception and will simply continue to the next activity even if there is an error. Ensure that the “ContinueOnError” property is set to False for the activity that you expect to throw an error.
  4. Selector Validation: UiPath may have improved its selector validation and recovery mechanisms in more recent versions. If the activity with the incorrect selector does not cause a critical error in the workflow, it might not trigger the Catch block.
  5. Debugging: When debugging in UiPath, some exceptions may not halt the workflow if you are in debug mode. Make sure you are running the workflow in a non-debug mode to observe the error behavior accurately.
  6. Logging: Check the robot’s logging settings. If you have configured logging to a lower level (e.g., “Info” instead of “Error”), errors might not be reported as exceptions, and you may not see them in the logs.

To troubleshoot this issue, you can:

  • Verify the Try-Catch configuration, including the exception type and the “ContinueOnError” property.
  • Temporarily set the error handling for the activity to “Throw” to force it to throw an exception for testing purposes.
  • Check the logs and output pane in UiPath Studio to see if any error messages or warnings are displayed.

If you are still facing issues, please provide more specific details about your workflow and the versions of UiPath Studio and the activities you are using so that I can provide more targeted assistance.

2 Likes