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

Method error

tools/python-3.11.9-amd64/Lib/optparse.py:1561–1569  ·  view source on GitHub ↗

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

(self, msg)

Source from the content-addressed store, hash-verified

1559 sys.exit(status)
1560
1561 def error(self, msg):
1562 """error(msg : string)
1563
1564 Print a usage message incorporating 'msg' to stderr and exit.
1565 If you override this in a subclass, it should not return -- it
1566 should either exit or raise an exception.
1567 """
1568 self.print_usage(sys.stderr)
1569 self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
1570
1571 def get_usage(self):
1572 if self.usage:

Callers 5

testFunction · 0.95
parse_argsMethod · 0.95
_process_long_optMethod · 0.95
_process_short_optsMethod · 0.95
mainFunction · 0.95

Calls 3

print_usageMethod · 0.95
exitMethod · 0.95
get_prog_nameMethod · 0.95

Tested by

no test coverage detected