MCPcopy Index your code
hub / github.com/blacklanternsecurity/bbot / error

Method error

bbot/modules/base.py:1695–1709  ·  view source on GitHub ↗

Logs an error message, and optionally the stack trace of the most recent exception. Args: *args: Variable-length argument list to pass to the logger. trace (bool, optional): Whether to log the stack trace of the most recently caught exception. Defaults to True.

(self, *args, trace=True, **kwargs)

Source from the content-addressed store, hash-verified

1693 self.trace()
1694
1695 def error(self, *args, trace=True, **kwargs):
1696 """Logs an error message, and optionally the stack trace of the most recent exception.
1697
1698 Args:
1699 *args: Variable-length argument list to pass to the logger.
1700 trace (bool, optional): Whether to log the stack trace of the most recently caught exception. Defaults to True.
1701 **kwargs: Arbitrary keyword arguments to pass to the logger.
1702
1703 Examples:
1704 >>> self.error("This is an error message")
1705 >>> self.error("This is an error message with a trace", trace=False)
1706 """
1707 self.log.error(*args, extra={"scan_id": self.scan.id}, **kwargs)
1708 if trace:
1709 self.trace()
1710
1711 def trace(self, msg=None):
1712 """Logs the stack trace of the most recently caught exception.

Callers 15

_workerMethod · 0.95
is_incoming_duplicateMethod · 0.95
vega-embed@6.jsFile · 0.45
daFunction · 0.45
WaFunction · 0.45
aFunction · 0.45
vega@5.jsFile · 0.45
pzFunction · 0.45
gzFunction · 0.45
evaluateFunction · 0.45
_mainFunction · 0.45

Calls 1

traceMethod · 0.95

Tested by 3

test_module_loadingFunction · 0.36
setup_before_prepMethod · 0.36
setup_before_prepMethod · 0.36