MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / error

Method error

tools/python-3.11.9-amd64/Lib/argparse.py:2629–2640  ·  view source on GitHub ↗

error(message: string) Prints a usage message incorporating the message to stderr and exits. If you override this in a subclass, it should not return -- it should either exit or raise an exception.

(self, message)

Source from the content-addressed store, hash-verified

2627 _sys.exit(status)
2628
2629 def error(self, message):
2630 """error(message: string)
2631
2632 Prints a usage message incorporating the message to stderr and
2633 exits.
2634
2635 If you override this in a subclass, it should not return -- it
2636 should either exit or raise an exception.
2637 """
2638 self.print_usage(_sys.stderr)
2639 args = {'prog': self.prog, 'message': message}
2640 self.exit(2, _('%(prog)s: error: %(message)s\n') % args)

Callers 12

mainFunction · 0.95
mainFunction · 0.95
add_subparsersMethod · 0.95
parse_argsMethod · 0.95
parse_known_argsMethod · 0.95
_parse_known_argsMethod · 0.95
_read_args_from_filesMethod · 0.95
_parse_optionalMethod · 0.95
_get_option_tuplesMethod · 0.95
parse_intermixed_argsMethod · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 3

print_usageMethod · 0.95
exitMethod · 0.95
_Function · 0.70

Tested by

no test coverage detected