Return as a string (ending with a newline) the exception that just occurred, without any traceback.
(self, exc_tuple=None)
| 1996 | print("UsageError: %s" % exc, file=sys.stderr) |
| 1997 | |
| 1998 | def get_exception_only(self, exc_tuple=None): |
| 1999 | """ |
| 2000 | Return as a string (ending with a newline) the exception that |
| 2001 | just occurred, without any traceback. |
| 2002 | """ |
| 2003 | etype, value, tb = self._get_exc_info(exc_tuple) |
| 2004 | msg = traceback.format_exception_only(etype, value) |
| 2005 | return ''.join(msg) |
| 2006 | |
| 2007 | def showtraceback(self, exc_tuple=None, filename=None, tb_offset=None, |
| 2008 | exception_only=False, running_compiled_code=False): |
no test coverage detected