-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle lookup errors when connecting #37
base: master
Are you sure you want to change the base?
Conversation
Given that we still have some of the error codes enumerated, would it perhaps make more sense to leave the others that were enumerated, and just add a default case, perhaps with a "warning, missing enums in library handling!" ? |
Ensure that lua 5.4 module is installed in correct location. Fix error handling, for lookup errors. ref: flukso/lua-mosquitto#37
The idea was to only handle the special cases:
And then just returns the error number with the This helps us to deal with undocumented errors (like no connection) and future errors. I dont think we need a warning for it. One question though, I don't know we we should raise a lua error by default or return the error number. |
Ensure that lua 5.4 module is installed in correct location. Fix error handling, for lookup errors. ref: flukso/lua-mosquitto#37
Connect may result in lookup error, which was not handled. Solve this by use a default error handler which returns whatever mosquitto reports. This prevents us from missing errors.
d1e5304
to
05ce554
Compare
Rebased it to do this, but I have no idea how to do the warning. @karlp can you please have another look? |
Ensure that lua 5.4 module is installed in correct location. Fix error handling, for lookup errors. ref: flukso/lua-mosquitto#37
Ensure that lua 5.4 module is installed in correct location. Fix error handling, for lookup errors. ref: flukso/lua-mosquitto#37
Ensure that lua 5.4 module is installed in correct location. Fix error handling, for lookup errors. ref: flukso/lua-mosquitto#37
Connect may result in lookup error, which was not handled. Solve this by use a default error handler which returns whatever mosquitto reports.
This prevents us from missing errors.