I’m a Phd student and I’m working on IT security in the RPA field.
I ask for help, since I’m not be able to record the errors I get from Uipath Studio :frowny:
As you can see I try to use the “try-catch” activity to trap the error that occurs in the “try” statement and log using “AppendLine” activity. But it doesn’t work, and I don’t know why
The error I got is something like a memory error since the file is too big.
What I’d like to obtain is a way to log errors independently of the activity inside the try, since I’m currently working on cybersecurity issues about RPA.
I don’t know what trow is, I’m still a beginner on Uipath and RPAs in general.
Not sure why you have Exception and SystemException as catches. I’ve never even seen SystemException, not sure how you got that.
Should just be one that says Exception, where you selected System.Exception
This is a catch-all for all exception types. Unless you know exactly which type of error it is, your catch block should be System.Exception. There are lots of different types of errors like businessruleexception, applicationexception, ioexception, etc etc etc. This allows handling of different types of errors with different steps. To simply catch all errors in one catch, use System.Exception.
I added these exceptions because the only “exception” did not work. I then tried to add System.Exeption too, with the same sequence of “exception”, but it seems not to be executed, as if the process is stopped before arriving in that statement.
I added a Throw before the “Read text File” activity, which is the one that gives the error. In this case, the catch statement works without problem.
I also moved the Throw after the “Read text File” activity, to see what happens, and in that case the catch statement won’t work. The process shows the error:
That tells us the Read Text File activity is failing. A quick Google search on that 0x code shows that it’s usually a .net error. You may have the wrong version of .Net or a corrupt installation.
Is that text file large? That can also cause this error.
Yes, the file is very large. It is like 2 GB, because I’m now working on security issues on RPAs.
This was just an experiment to see what kind of problem could bring an error of it and if this can be exploited.
I’m looking for a way to log those errors since inside the Uipath default Log folder, there are also other errors that I don’t care about.
I went through this long thread and @postwick has patiently tried to troubleshoot with you.
Lets recap, you are trying to read a large file and UiPath fails to read that file and does not jump to the catch block. You still want to get list of all error messages during your executions.
It is completely fine if UiPath fails, you should rather look at the higher level of abstraction. Your robot ran on a windows machine, in any modern windows machine you always can install the Windows Event Viewer (in servers this is already installed), I think it is also installed in windows 10 client pc by default.
Windows Event Viewer allows access to each windows event in your windows session and lets you slice and dice based on source, time and event types. We know that the error you want to retrieve originated from UiPath, so filter the event logs accordingly. You can then save all the failure events into a csv as Windows Event Viewer allows exporting to a zip file.
This way all failure events from UiRobot.exe are structured with timestamps, which I am sure is another advantage.