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)
| 2371 | _sys.exit(status) |
| 2372 | |
| 2373 | def error(self, message): |
| 2374 | """error(message: string) |
| 2375 | |
| 2376 | Prints a usage message incorporating the message to stderr and |
| 2377 | exits. |
| 2378 | |
| 2379 | If you override this in a subclass, it should not return -- it |
| 2380 | should either exit or raise an exception. |
| 2381 | """ |
| 2382 | self.print_usage(_sys.stderr) |
| 2383 | self.exit(2, _('%s: error: %s\n') % (self.prog, message)) |