MCPcopy Index your code
hub / github.com/google/python-fire / FireExit

Class FireExit

fire/core.py:185–203  ·  view source on GitHub ↗

An exception raised by Fire to the client in the case of a FireError. The trace of the Fire program is available on the `trace` property. This exception inherits from SystemExit, so clients may explicitly catch it with `except SystemExit` or `except FireExit`. If not caught, this exception

Source from the content-addressed store, hash-verified

183
184
185class FireExit(SystemExit): # pylint: disable=g-bad-exception-name
186 """An exception raised by Fire to the client in the case of a FireError.
187
188 The trace of the Fire program is available on the `trace` property.
189
190 This exception inherits from SystemExit, so clients may explicitly catch it
191 with `except SystemExit` or `except FireExit`. If not caught, this exception
192 will cause the client program to exit without a stacktrace.
193 """
194
195 def __init__(self, code, component_trace):
196 """Constructs a FireExit exception.
197
198 Args:
199 code: (int) Exit code for the Fire CLI.
200 component_trace: (FireTrace) The trace for the Fire command.
201 """
202 super().__init__(code)
203 self.trace = component_trace
204
205
206def _IsHelpShortcut(component_trace, remaining_args):

Callers 1

FireFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected