| 29 | |
| 30 | |
| 31 | class ParamError(Exception): |
| 32 | def __init__(self, cli_name, message): |
| 33 | """ |
| 34 | |
| 35 | :type cli_name: string |
| 36 | :param cli_name: The complete cli argument name, |
| 37 | e.g. "--foo-bar". It should include the leading |
| 38 | hyphens if that's how a user would specify the name. |
| 39 | |
| 40 | :type message: string |
| 41 | :param message: The error message to display to the user. |
| 42 | |
| 43 | """ |
| 44 | full_message = "Error parsing parameter '%s': %s" % (cli_name, message) |
| 45 | super(ParamError, self).__init__(full_message) |
| 46 | self.cli_name = cli_name |
| 47 | self.message = message |
| 48 | |
| 49 | |
| 50 | class ParamSyntaxError(Exception): |
no outgoing calls
no test coverage detected