ehForwarderBot / efb-qq-slave

EFB QQ Slave, a channel for EH Forwarder Bot. EFB QQ从端
GNU General Public License v3.0
447 stars 48 forks source link

feature: Add more robust error handling #115

Closed shejialuo closed 5 months ago

shejialuo commented 1 year ago

Now when loading the corresponding clients, it uses a try-except to make sure that the specified client in the configuration file has been installed by the user. However, there are some tricky things. The code uses c.load() to load a distribution. However, the c.load() itself may fail which causes exception "Specified client not found". Although users have already installed some specified client, c.load() could fail in the following situations:

However, the code just provides exception "Specified client not found" which is not clear for users. That's why there are many issues which talks about this exception (#105 #113 #102)

So this patch aims at providing more robust error handling which could make users understand what really happens to make the users life easier.

milkice233 commented 1 year ago

Thanks for your contributions! I'm afraid the review may take some time because I'm just so busy (or a little bit procrastinating I admit) that I even have no time to refactor the code. I'll get back longer.

shejialuo commented 1 year ago

@milkice233 Hello, I am sorry to trouble you. Is there a feedback for this PR.