habitat.utils.quick_traceback

Quick traceback module shortcuts for logging

Functions

oneline([exc_value]) Return a single line describing ‘exc_value’
habitat.utils.quick_traceback.oneline(exc_value=None)[source]

Return a single line describing ‘exc_value’

exc_value shold be either an Exception instance, for example, acquired via ‘except ValueError as e:’; or None, in which case the exception currently being handled is used.

The string returned is the last line of Python’s normal traceback; something like ‘ValueError: some message’, with no newline.