QuestionQ97

VerifiedLogging

Which Log Message expression should the developer use to add comprehensive log messages to the process being developed and indicate the activity that caused the error?

Explanation

For a comprehensive log message that also indicates which activity caused the error, the expression should combine the exception's message with its source: exception.Message + " at " + exception.Source. In UiPath, exception.Message gives the descriptive detail (making the log 'comprehensive') while exception.Source returns the display name of the activity that threw the exception (indicating the offending activity). Options that use only exception.Source (like 'Exception occurred at ' + exception.Source) identify the activity but omit the descriptive message, so they are less comprehensive; exception.StackTrace does not cleanly identify the activity. The existing key of D is therefore incorrect.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!