<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_log_error(self, x, flag_also_show=False, E=None):

 """Sets text of labelError."""

        if len(x) == 0:
            x = "(empty error)"
            tb.print_stack()
        x_ = x
        if E is not None:
            a99.get_python_logger().exception(x_)
        else:
            a99.get_python_logger().info("ERROR: {}".format(x_))

        x = '<span style="color: {0!s}">{1!s}</span>'.format(a99.COLOR_ERROR, x)
        self._add_log_no_logger(x, False)
        if flag_also_show:
            a99.show_error(x_)