print('Error - ' ) is not working as expected in azure python runbook

Ravi Shekhar 1 Reputation point
2022-11-30T12:46:44.04+00:00

Hi ,

I am referring below link for printing error message in Error tab of Azure Python Runbook.
https://learn.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual-python-3

Below is the print statement used by me
try:
raise Exception('one', 'two')
except Exception as detail:
print ('ERROR: Handling run-time error:', detail)

But this is printing error message in output tab only.

Please help me with the way to perform this.

[265659-image.png][1]

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,272 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.