Closed cas-- closed 4 years ago
branch?
All... but with error_message
the test is for >=1.1
error_message()
(primarily) is meant to communicate the "failure_reason". Looking through the code, it appears to be used for HTTP status messages as well (on failures) and one case of an i2p error.
However, the majority of errors that have error codes, just report the error code. You suggest copying the error_code message into that field in case it's empty?
You suggest copying the error_code message into that field in case it's empty?
Yes as that is what I had previously had to do, though there was no option to simply get just the message (without codes): https://github.com/deluge-torrent/deluge/blob/1.3-stable/deluge/core/torrentmanager.py#L1045
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
So I was seeing the empty tracker messages again after changing some of the alert handling code. I know that you said for
-1
status_code then the error message would be left empty as there was no additional message from the tracker. I now understand the issue and these particular errors are actually from boost.system.error_codes.I have written an test example using a torrent that contains
udp://tracker.publicbt.com:80/announce
andudp://tracker.openbittorrent.com:80/announce
and as you can see from the output a boost error_code message and value is received. Can these not be used to populate the lterror_message
?I still think it would be useful if
status_code
is-1
and there is no message (from tracker) to have something in alert.message()? e.g. 'unknown error from tracker'.