Hi all,
I have surrounded the body of the for loop with Try Catch, but still it is throwing error and terminating the process.
Exception Type Occurred is : System.NullReferenceException
Hi all,
I have surrounded the body of the for loop with Try Catch, but still it is throwing error and terminating the process.
Exception Type Occurred is : System.NullReferenceException
Would this simple project match yours?
As you can see in the output panel, it works on my end on the latest version of Studio (actually, the 2019.8.0 beta version).
I am using version 2018.4.3, and has handled the exception in the same way as you have mentioned in the screenshot. But instead of handling it in catch block its throwing the error and terminates.
Then unfortunately it looks like a bug, but one that was fortunately already fixed.
I canât say for sure if the latest patch for your LTS version contains the fix, but it would be worth a try:
That is, of course, if updating to the latest Stable Enterprise edition is not an option ( 2019.4.4).
You can also try to update just the packages in your project first. The latest packages (19.7.0) such as UiPath.System will work with your version and could fix the issue.
How about this:
exception.Message.toString.
Youâre creating an exception while accessing an exception object
All the packages are already updated to its latest version.
The problem is that after encountering the exception instead of entering to the catch block it is throwing the error and stopping the process.
Then it might be something that was fixed by the latest releases. If upgrading to the latest stable Enterprise is not an option, I would consider contacting our technical support here:
They might be aware of the solution / workaround.
Thatâs because youâre not catching a general exception in your catch block.
If you catch only a âNull typeâ exception, but the exception thrown is a different type it wonât be caught by the catch block.
Add another âexceptionâ to your catch block and try again.
You must choose âRun program with mode Run or Run file not run mode Debugâ. It will work fine