Return as a string (ending with a newline) the exception that just occurred, without any traceback.
(self, exc_tuple=None)
| 2153 | print("UsageError: %s" % exc, file=sys.stderr) |
| 2154 | |
| 2155 | def get_exception_only(self, exc_tuple=None): |
| 2156 | """ |
| 2157 | Return as a string (ending with a newline) the exception that |
| 2158 | just occurred, without any traceback. |
| 2159 | """ |
| 2160 | etype, value, tb = self._get_exc_info(exc_tuple) |
| 2161 | msg = traceback.format_exception_only(etype, value) |
| 2162 | return ''.join(msg) |
| 2163 | |
| 2164 | def showtraceback( |
| 2165 | self, |
no test coverage detected