pdoc/doc.py
def _include_fullname_in_traceback(f):
    """
    Doc.__repr__ should not raise, but it may raise if we screwed up.
    Debugging this is a bit tricky, because, well, we can't repr() in the traceback either then.
    This decorator adds location information to the traceback, which helps tracking down bugs.
    """

    @wraps(f)
    def wrapper(self):
        try:
            return f(self)
        except Exception as e:
            raise RuntimeError(f"Error in {self.fullname}'s repr!") from e

    return wrapper

    Doc.__repr__ should not raise, but it may raise if we screwed up.
    Debugging this is a bit tricky, because, well, we can't repr() in the traceback either then.
    This decorator adds location information to the traceback, which helps tracking down bugs.
    
Doc.__repr__ should not raise, but it may raise if we screwed up.
Debugging this is a bit tricky, because, well, we can't repr() in the traceback either then.
This decorator adds location information to the traceback, which helps tracking down bugs.
Doc . __repr__ should not raise but it may raise if we screwed up . Debugging this is a bit tricky because well we can ' t repr () in the traceback either then . This decorator adds location information to the traceback which helps tracking down bugs .
def _include_fullname_in_traceback(f):
    @wraps(f)
    def wrapper(self):
        try:
            return f(self)
        except Exception as e:
            raise RuntimeError(f"Error in {self.fullname}'s repr!") from e
    return wrapper
def _include_fullname_in_traceback ( f ) : @ wraps ( f ) def wrapper ( self ) : try : return f ( self ) except Exception as e : raise RuntimeError ( f"Error in {self.fullname}'s repr!" ) from e return wrapper
Doc.__repr__ should not raise, but it may raise if we screwed up.
Doc . __repr__ should not raise but it may raise if we screwed up .
"""
    Doc.__repr__ should not raise, but it may raise if we screwed up.
    Debugging this is a bit tricky, because, well, we can't repr() in the traceback either then.
    This decorator adds location information to the traceback, which helps tracking down bugs.
    """
f