Raised if an Option instance is created with invalid or inconsistent arguments.
| 95 | |
| 96 | |
| 97 | class OptionError (OptParseError): |
| 98 | """ |
| 99 | Raised if an Option instance is created with invalid or |
| 100 | inconsistent arguments. |
| 101 | """ |
| 102 | |
| 103 | def __init__(self, msg, option): |
| 104 | self.msg = msg |
| 105 | self.option_id = str(option) |
| 106 | |
| 107 | def __str__(self): |
| 108 | if self.option_id: |
| 109 | return "option %s: %s" % (self.option_id, self.msg) |
| 110 | else: |
| 111 | return self.msg |
| 112 | |
| 113 | class OptionConflictError (OptionError): |
| 114 | """ |
no outgoing calls
no test coverage detected
searching dependent graphs…