We created a simple library (ConvertToInt.1.0.1) and a simple process (SimulateConvertions.1.0.1) that uses the library. The library converts a number to int. The process will call the library with some values. One is not going to be a number. So, when you run SimulateConvertions from UiPath Studio or UiPath Assistant there will be an error. The error log will be:
Converter WrongNumber: Input string was not in a correct format.
But we are missing is the next error log:
Assign out_int int.Parse(in_string): Input string was not in a correct format.
We want to see both error logs when we run SimulateConvertions.
The int.Parse method is wrapped in a try-catch block. If the input string is not in the correct format, a FormatException will be thrown, and the exception message will be logged in the catch block. This way, both error logs will be visible when running the SimulateConversions process.
We were looking for something more general. Not something particular to this example.
We have some logins in libraries. When they have an error, we don’t know where is the error. Because the log online points out the activity that called the library. The same way happens in the above example.