pcdsutils.log.get_file_and_line_from_traceback

pcdsutils.log.get_file_and_line_from_traceback(tb: TracebackType, *, on_error: str = 'unknown') tuple[str, int][source]

Get the last source filename and line number from the traceback.

Parameters:
tbtraceback
on_errorstr, optional

The default filename if unable to determine the source code location from the traceback.

Returns:
filenamestr
linenoint