Print full stacktraces
This commit is contained in:
parent
0dc58bcd88
commit
018f259b27
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@ import enum
|
||||||
import socket
|
import socket
|
||||||
import datetime
|
import datetime
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
import traceback
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
@ -425,6 +426,8 @@ class Session():
|
||||||
try:
|
try:
|
||||||
return fn(self, *args)
|
return fn(self, *args)
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
|
traceback.print_exception(e)
|
||||||
return self.respond(ResponseCode.NNTP_SYNTAX_ERROR)
|
return self.respond(ResponseCode.NNTP_SYNTAX_ERROR)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
traceback.print_exception(e)
|
||||||
return self.respond(ResponseCode.NNTP_COMMAND_UNAVAILABLE)
|
return self.respond(ResponseCode.NNTP_COMMAND_UNAVAILABLE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue