Error not logged efficiently

we are using Uipath Studio and Orchestrator Version 2018.4.3.
While developing we find enties in the logfiles like these
“Object reference not set to an instance of an object” or “cannot find the uielement corresponding to this selector”. We are missing the name of the object and the content of the selector in these cases.
I would like to ask if it is possible to mention the name of the object and also the selectors content. Without these information it is difficult to fix problems.

Kind regards
Martin N.

this error means some property or some value is passed as null.

please check if the variables are null and try.

Or you can debug the code where you will get to know where null is passed in the local window in the studio.

Let us know if this helps
Pavan H

Thank you, I can read and understand what is written in the log files.
I think if an error is thrown the message should also be able to name the object whose reference is not set or if an uiElement is not found to display the selectors content. Otherwise it is not very easy to check where this error occured.
How do you check the variable which name you don’t know?

Try with try catch in the catch block use one of the possible exception that you will get and then use write line, this will give you the exception

Let us know if this helps,
Pavan H

Thank you for your answer. But in my opinion this is not a good idea in this case. How will you write something into lines where the needed information is not available at that point?

I have set up my process as REF-Process where a central exception handler is implemented.
At points where I expect exceptions or errors I have implementet technics to get as many information as possible and then use a throw.
So the central handler writes into the logfiles. But it can only write information into logfiles that it gets from the engine.
So in my post I’m asking that the engine gives more information in the thrown exceptions. There are casese where the needed information is complete an sufficient. But in other cases - some of these cases I named in my post e.g. the name of the object that has no instance, because the name is available at that point - the needed information is not complete. That is what I’m asking for.