Belle II Software development
DefaultHelpArgumentParser Class Reference
Inheritance diagram for DefaultHelpArgumentParser:

Public Member Functions

def error (self, message)
 

Detailed Description

An argparse.Argument parse slightly changed such
that it always prints an extended help message in case of a parsing error.

Definition at line 15 of file utilities.py.

Member Function Documentation

◆ error()

def error (   self,
  message 
)
Method invoked when a parsing error occurred.
Writes an extended help over the base ArgumentParser.

Definition at line 20 of file utilities.py.

20 def error(self, message):
21 """Method invoked when a parsing error occurred.
22 Writes an extended help over the base ArgumentParser.
23 """
24 self.print_help()
25 sys.stderr.write(f'error: {message}\n')
26 sys.exit(2)
27
28

The documentation for this class was generated from the following file: