mirror of
https://github.com/google/bumble.git
synced 2026-05-06 03:38:01 +00:00
Always log exception using logging.exception
This commit is contained in:
@@ -1084,8 +1084,8 @@ class Server:
|
||||
def on_pdu(self, pdu):
|
||||
try:
|
||||
sdp_pdu = SDP_PDU.from_bytes(pdu)
|
||||
except Exception as error:
|
||||
logger.warning(color(f'failed to parse SDP Request PDU: {error}', 'red'))
|
||||
except Exception:
|
||||
logger.exception(color('failed to parse SDP Request PDU', 'red'))
|
||||
self.send_response(
|
||||
SDP_ErrorResponse(
|
||||
transaction_id=0, error_code=SDP_INVALID_REQUEST_SYNTAX_ERROR
|
||||
@@ -1100,8 +1100,8 @@ class Server:
|
||||
if handler:
|
||||
try:
|
||||
handler(sdp_pdu)
|
||||
except Exception as error:
|
||||
logger.exception(f'{color("!!! Exception in handler:", "red")} {error}')
|
||||
except Exception:
|
||||
logger.exception(color("!!! Exception in handler:", "red"))
|
||||
self.send_response(
|
||||
SDP_ErrorResponse(
|
||||
transaction_id=sdp_pdu.transaction_id,
|
||||
|
||||
Reference in New Issue
Block a user