Skip to content

Commit

Permalink
added "❌ MONKEYBLE ERROR ❌" in logs output when scenario failed
Browse files Browse the repository at this point in the history
make easier to retrieve a failed scenario
  • Loading branch information
Sispheor committed Feb 2, 2023
1 parent 8a08084 commit 0baaea8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/module_utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
class MonkeybleException(Exception):
def __init__(self, message, scenario_description=None, exit_code=1):
super().__init__(message)
global_display.display(msg=f"❌ MONKEYBLE ERROR ❌", color=C.COLOR_ERROR)
if scenario_description is not None:
global_display.display(msg=f"🙊 Monkeyble failed scenario: {scenario_description}", color=C.COLOR_ERROR)
global_display.display(msg=f"🙊 Failed scenario: {scenario_description}", color=C.COLOR_ERROR)
global_display.display(msg=message, color=C.COLOR_ERROR)
sys.exit(exit_code)

0 comments on commit 0baaea8

Please sign in to comment.