mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-05-02 00:53:01 +00:00
SFTP: log tracebacks for RAISEd exceptions.
This commit is contained in:
parent
725daee788
commit
c6b414c815
@ -83,8 +83,11 @@ def _convert_error(res, request):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
err = res
|
err = res
|
||||||
logmsg("RAISE %r %r" % (request, err,), level=OPERATIONAL)
|
logmsg("RAISE %r %r" % (request, err.value), level=OPERATIONAL)
|
||||||
if noisy and not use_foolscap_logging: traceback.print_exc(err)
|
try:
|
||||||
|
if noisy: logmsg(traceback.format_exc(err.value), level=NOISY)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# The message argument to SFTPError must not reveal information that
|
# The message argument to SFTPError must not reveal information that
|
||||||
# might compromise anonymity.
|
# might compromise anonymity.
|
||||||
@ -1319,7 +1322,7 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
|
|||||||
if noisy: self.log("_nosuch(%r)" % (err,), level=NOISY)
|
if noisy: self.log("_nosuch(%r)" % (err,), level=NOISY)
|
||||||
err.trap(NoSuchChildError)
|
err.trap(NoSuchChildError)
|
||||||
direntry = self._direntry_for(parent, childname)
|
direntry = self._direntry_for(parent, childname)
|
||||||
if noisy: self.log("checking open files:\nself._open_files = %r\nall_open_files = %r, direntry=%r" %
|
if noisy: self.log("checking open files:\nself._open_files = %r\nall_open_files = %r\ndirentry=%r" %
|
||||||
(self._open_files, all_open_files, direntry), level=NOISY)
|
(self._open_files, all_open_files, direntry), level=NOISY)
|
||||||
if direntry in all_open_files:
|
if direntry in all_open_files:
|
||||||
(files, opentime) = all_open_files[direntry]
|
(files, opentime) = all_open_files[direntry]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user