Improved exception handling of expected exceptions - if they are expected, we don't need to see the error trace.

This commit is contained in:
VakarisZ 2021-02-25 16:26:43 +02:00
parent e9b84ff86d
commit ce697b3a45
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ class HostExploiter(Plugin):
result = None result = None
try: try:
result = self._exploit_host() result = self._exploit_host()
except FailedExploitationError: except FailedExploitationError as e:
logger.debug('Exploiter failed.', exc_info=True) logger.debug(f'Exploiter failed: {e}.')
except Exception: except Exception:
logger.error('Exception in exploit_host', exc_info=True) logger.error('Exception in exploit_host', exc_info=True)
finally: finally: