#NEWLINE# def get_failed_action_messages( exception ) : #NEWLINE# #INDENT# '\n    Fail an action using the given exception.\n\n    :return: Logged dictionaries from the exception failing an action.\n    ' #NEWLINE# action_type = ActionType ( 'sys:me' , [ ] , [ ] ) #NEWLINE# logger = MemoryLogger ( ) #NEWLINE# action = action_type . as_task ( logger = logger ) #NEWLINE# try : #NEWLINE# #INDENT# with action_type : #NEWLINE# #INDENT# raise exception #NEWLINE# #UNINDENT# #UNINDENT# except exception . __class__ : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# logger . validate ( ) #NEWLINE# return logger . messages [ 1 : ]