UiADAv1 Exam QuestionsBrowse all questions from this exam

UiADAv1 Exam - Question 32


What is the correct Log Message expression that the developer should use to integrate comprehensive log messages into the process under development, indicating which activity caused the error?

Show Answer
Correct Answer: A

The correct log message expression should provide the most comprehensive information about the error, including where it occurred. The expression 'Exception occurred at ' + exception.StackTrace provides detailed information about the location in the code where the error happened, which includes the activity that caused the error. This is more comprehensive than just the exception source or message.

Discussion

2 comments
Sign in to comment
TomaszWolOption: A
Nov 21, 2024

C. Doesn't compile in that form unless we write it like this: 'exception.Message'. I don't know if that typo was intentional. The correct form displays for example 'Index was out of bounds of the array' and the source, which is typically the name of the application or the object that caused the error. It does not indicate the activity that caused the error. B and D only display source of the exception. A provides the most detailed information about the error for me.

a48535dOption: D
Nov 16, 2024

Isn't it D?