def METHOD_NAME(self):
    """Print extended debug information about this exception.
    This is usually printed when the top-level Spack error handler
    calls ``die()``, but it can be called separately beforehand if a
    lower-level error handler needs to print error context and
    continue without raising the exception to the top level.
    """
    if self.printed:
        return
    # basic debug message
    tty.error(self.message)
    if self.long_message:
        sys.stderr.write(self.long_message)
        sys.stderr.write("\n")
    # stack trace, etc. in debug mode.
    if debug:
        if self.traceback:
            # exception came from a build child, already got
            # traceback in child, so print it.
            sys.stderr.write(self.traceback)
        else:
            # run parent exception hook.
            sys.excepthook(*sys.exc_info())
    sys.stderr.flush()
    self.printed = True