eclipse-uprotocol / up-transport-zenoh-cpp

C++ client library to connect to the zenoh implementation of uProtocol
Apache License 2.0
5 stars 15 forks source link

Error handling in callbacks #88

Open sashacmc opened 3 months ago

sashacmc commented 3 months ago

Added error handling for message/sample conversions (including exceptions thrown by Zenoh) in callbacks

stevenhartley commented 3 months ago

If we parsing the attachments to generate UMessage failed, how can we know what is the right callback to call? The change you propose sends and internal error but there is no source or sink so we don't know what to do with the error. I say we log and drop the message for now

sashacmc commented 3 months ago

If we parsing the attachments to generate UMessage failed, how can we know what is the right callback to call? The change you propose sends and internal error but there is no source or sink so we don't know what to do with the error. I say we log and drop the message for now

Ok, I reverted changes to only report error in the log

sashacmc commented 2 months ago

Hi @gregmedd, I'm still waiting your response, should we rework all error handling to avoid exception usage? And how we should report the error, except the logging?