<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def environment_failure(self, error):
        '''
        Log environment failure for the daemon and exit with the error code.

        :param error:
        :return:
        '''
        log.exception(
            'Failed to create environment for %s: %s',
            self.__class__.__name__, get_error_message(error)
        )
        self.shutdown(error)