def _write_error(self, output, error):
        """
        Outputs an error message.

        :param output: An Output instance
        :type output: Output

        :param error: A Exception instance
        :type error: Exception
        """
        if self.helper_set is not None and self.helper_set.has('formatter'):
            message = self.helper_set.get('formatter').format_block(decode(str(error)), 'error')
        else:
            message = '<error>%s</error>' % decode(str(error))

        output.writeln(message)
dataset/ETHPy150Open sdispater/cleo/cleo/helpers/question_helper.py/QuestionHelper._write_error/original