#NEWLINE# @ contextlib . contextmanager #NEWLINE# def _actor_error_handling( name ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( yield ) #NEWLINE# #UNINDENT# except exceptions . BackendError as exc : #NEWLINE# #INDENT# logger . error ( 'Backend (%s) initialization error: %s' , name , exc . message ) #NEWLINE# #UNINDENT# except exceptions . FrontendError as exc : #NEWLINE# #INDENT# logger . error ( 'Frontend (%s) initialization error: %s' , name , exc . message ) #NEWLINE# #UNINDENT# except exceptions . MixerError as exc : #NEWLINE# #INDENT# logger . error ( 'Mixer (%s) initialization error: %s' , exc , exc . message ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# logger . exception ( 'Got un-handled exception from %s' , name )