Print internal error message (output defaults to stderr).
15430
def internal_error(out=sys.stderr, etype=None, evalue=None, tb=None):
    """"""
    print(os.linesep, file=out)
    print("""********** Oops, I did it again. *************

You have found an internal error in %(app)s. Please write a bug report
at %(url)s and include at least the information below:

Not disclosing some of the information below due to privacy reasons is ok.
I will try to help you nonetheless, but you have to give me something
I can work with ;) .
""" % dict(app=AppName, url=SupportUrl), file=out)
    if etype is None:
        etype = sys.exc_info()[0]
    if evalue is None:
        evalue = sys.exc_info()[1]
    print(etype, evalue, file=out)
    if tb is None:
        tb = sys.exc_info()[2]
    traceback.print_exception(etype, evalue, tb, None, out)
    print_app_info(out=out)
    print_proxy_info(out=out)
    print_locale_info(out=out)
    print(os.linesep,
            "******** %s internal error, over and out ********" % AppName, file=out)
91649
def show_error(msg):
    
    sys.stdout.flush()
    sys.stderr.write("\n{0!s}: {1}".format(colored.red("Error"), msg + '\n'))
585504
def error(self, message):
        """"""
        if self._debug:
            import pdb
            _, _, tb = sys.exc_info()
            if tb:
                pdb.post_mortem(tb)
            else:
                pdb.set_trace()
        self.print_usage(sys.stderr)
        self.exit(2, ('\nERROR: {}\n').format(message))
1185265
def print_errors(self, file_name):
        
        for error in self.get_messages(file_name):
            print('\t', error.__unicode__())
571156
def error(self, message: str) -> None:
        """"""
        if len(self._custom_error_message) > 0:
            message = self._custom_error_message
            self._custom_error_message = ''

        lines = message.split('\n')
        linum = 0
        formatted_message = ''
        for line in lines:
            if linum == 0:
                formatted_message = 'Error: ' + line
            else:
                formatted_message += '\n       ' + line
            linum += 1

        sys.stderr.write(Fore.LIGHTRED_EX + '{}\n\n'.format(formatted_message) + Fore.RESET)
        # sys.stderr.write('{}\n\n'.format(formatted_message))
        self.print_help()
        sys.exit(1)
1083317
def error(self, msg, indent=0, **kwargs):
        """"""
        return self.logger.error(self._indent(msg, indent), **kwargs)
170263
def err(*output, **kwargs):
    
    output = 'Error: ' + ' '.join([str(o) for o in output])
    if kwargs.get('wrap') is not False:
        output = '\n'.join(wrap(output, kwargs.get('indent', '')))
    elif kwargs.get('indent'):
        indent = kwargs['indent']
        output = indent + ('\n' + indent).join(output.splitlines())
    sys.stderr.write(output + '\n')
1004233
def error(message, *args, **kwargs):
    
    if 'end' in kwargs:
        end = kwargs['end']
    else:
        end = '\n'

    if len(args) == 0:
        sys.stderr.write(message)
    else:
        sys.stderr.write(message % args)
    sys.stderr.write(end)
    sys.stderr.flush()
114407
def err(msg, level=-1, prefix=True):
    
    if will_print(level) or verbosity is None:
        printer(("ERROR: " if prefix else "") + msg, "red")
81870
def write_err(self, text):
        """"""
        stderr = self.stderr
        if self.stderr.closed:
            stderr = sys.stderr
        stderr.write(decode_output(u"\r", target_stream=stderr))
        stderr.write(decode_output(CLEAR_LINE, target_stream=stderr))
        if text is None:
            text = ""
        text = decode_output(u"{0}\n".format(text), target_stream=stderr)
        self.stderr.write(text)
        self.out_buff.write(decode_output(text, target_stream=self.out_buff))
479278
def stderr_metric(name, count, elapsed):
    
    _do_print(name, count, elapsed, file=sys.stderr)
171197
def on_IOError(self, e):
        

        sys.stderr.write("Error: %s: \"%s\"\n" % (e.strerror, e.filename))
331970
def stderr_output(cmd):
    """"""

    handle, gpg_stderr = stderr_handle()
    try:
        output = subprocess.check_output(cmd, stderr=gpg_stderr)  # nosec
        if handle:
            handle.close()

        return str(polite_string(output))
    except subprocess.CalledProcessError as exception:
        LOGGER.debug("GPG Command %s", ' '.join(exception.cmd))
        LOGGER.debug("GPG Output %s", exception.output)
        raise CryptoritoError('GPG Execution')
697831
def _emit_error(cls, message):
        """"""
        sys.stderr.write('ERROR: {message}\n'.format(message=message))
        sys.stderr.flush()
683914
def internal_error (out=stderr, etype=None, evalue=None, tb=None):
    """"""
    print(os.linesep, file=out)
    print(_("""********** Oops, I did it again. *************

You have found an internal error in LinkChecker. Please write a bug report
at %s
and include the following information:
- the URL or file you are testing
- the system information below

When using the commandline client:
- your commandline arguments and any custom configuration files.
- the output of a debug run with option "-Dall"

Not disclosing some of the information above due to privacy reasons is ok.
I will try to help you nonetheless, but you have to give me something
I can work with ;) .
""") % configuration.SupportUrl, file=out)
    if etype is None:
        etype = sys.exc_info()[0]
    if evalue is None:
        evalue = sys.exc_info()[1]
    if tb is None:
        tb = sys.exc_info()[2]
    better_exchook2.better_exchook(etype, evalue, tb, out=out)
    print_app_info(out=out)
    print_proxy_info(out=out)
    print_locale_info(out=out)
    print(os.linesep,
      _("******** LinkChecker internal error, over and out ********"), file=out)
1006709
def errorprint():
    """"""
    try:
        yield

    except ConfigurationError as e:
        click.secho('%s' % e, err=True, fg='red')
        sys.exit(1)
796799
def puts_err(s='', newline=True, stream=STDERR):
    """"""
    puts(s, newline, stream)