IRC login error handling
hi, it would be cool if you rise an error when there is an auth failure.
on the irc.py line 36
logging.fatal('IRC authentication error: ' + text or '')
#return
raise Exception('authentication error')
even better if you create an exceptions.py file:
class AuthenticationError(Exception)
pass
logging.fatal('IRC authentication error: ' + text or '')
raise AuthenticationError
So we can handle it, renewing the token or skipping the login. In my case im trying to handle multiple bots so its usefull
ty
+1 This would be super useful indeed, in order to catch error and create renewal process. Out of curiosity, @HoodyH did you find a way to catch the error without modifying the lib ? thx
Had a look into it, and the fix you proposed seems trivial but actually doesn't work because the library is threaded, so the exception is raised in the context of a child thread, but cannot be caught in the main thread. I look forward into it, but i'd be happy to get any insight on another (more pythonic) way to catch this