don't splurt error backtraces at the user

- Getting hit with a massive backtrace is slightly overwhelming. It also is a
  potential privacy issue, seeing as phone numbers (etc.) might be printed as
  part of the call stack...
This commit is contained in:
eta 2020-09-16 13:10:41 +01:00
parent 14ff49b1d2
commit 0da958a2d5
1 changed files with 1 additions and 3 deletions

View File

@ -260,11 +260,9 @@ WhatsXMPP represents users as u440123456789 and groups as g1234-5678."
(defun wa-handle-error (comp conn jid err bt)
(with-wa-handler-context (comp conn jid)
(format *debug-io* "~&whatscl error for ~A: ~A~%" jid err)
(format *debug-io* "~&whatscl error for ~A: ~A~%Backtrace:~A~%" jid err bt)
(admin-msg comp jid
(format nil "A programming error has been detected and your connection has been aborted unexpectedly.~%Report the following error to the bridge admin: ~A" err))
(admin-msg comp jid
(format nil "Backtrace:~%~A" bt))
(admin-msg comp jid "(Disabling automatic reconnections.)")
(admin-presence comp jid "Programming error" "xa")
(remhash jid (component-whatsapps comp))))