MCPcopy
hub / github.com/httpie/cli / error

Method error

httpie/cli/argparser.py:598–613  ·  view source on GitHub ↗

Prints a usage message incorporating the message to stderr and exits.

(self, message)

Source from the content-addressed store, hash-verified

596 self.env.rich_error_console.print(usage_text)
597
598 def error(self, message):
599 """Prints a usage message incorporating the message to stderr and
600 exits."""
601 self.print_usage(sys.stderr)
602 self.env.rich_error_console.print(
603 dedent(
604 f'''
605 [bold]error[/bold]:
606 {message}
607
608 [bold]for more information[/bold]:
609 run '{self.prog} --help' or visit https://httpie.io/docs/cli
610 '''.rstrip()
611 )
612 )
613 self.exit(2)

Callers 13

parse_argsMethod · 0.95
_process_authMethod · 0.95
_apply_no_optionsMethod · 0.95
_guess_methodMethod · 0.95
_parse_itemsMethod · 0.95
check_optionsMethod · 0.95
dispatch_cli_taskFunction · 0.80
programFunction · 0.80
cli_sessionsFunction · 0.80

Calls 1

print_usageMethod · 0.95

Tested by

no test coverage detected