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.