Hi guys, please help me identify the right answer and explain to me the difference between
“exception.source” and “exception.message”.
Thanks in advance.
1.A developer wants to ensure that a process they are developing includes coherent logs with meaningful log messages. During the execution of the process, an application exception is caught and stored in a local variable called exception.
Based on UiPath best practices, how should the Log Message activity in the Catch section of this exception be configured?
A. Level: Warn -
Message: exception.Message + “at” + exception.Source
B. Level: Error -
Message: “Exception occurred at” + exception.Source
C. Level: Fatal -
Message: exception.Message
D. Level: Info -
Message: “Application Exception at” + exception.Source
2.A developer wants to ensure that a process they are developing includes log messages that are meaningful and indicate which activity caused the error. During the execution of the process, an Application Exception is caught and stored in a local variable called exception.
How should the Message property of the Log Message activity in the Catch section of this exception be configured?
A. exception.Message + “at” + exception.Source
B. exception.Message
C. “Application Exception at” + exception.Source
D. “Exception occurred at” + exception.Source
Exception.message - this will give the exact exception which has occured…this is basically the message
Exception.source - this is the value where the exception occured…like which activity it is…it would display the activity name
Note: exception.source will display activity name only if the try catch is used on a invoke workflow activity…if the try catch is used on a sequence or any other actvity then it would not give the activity name but it would give the activity type …something like UiPath.core.activity like this…but not the actual name of activity