-
Notifications
You must be signed in to change notification settings - Fork 127
(bugfix) Unhandled exception - Abort raised when write to the jaeger-… #80
Conversation
…agent fails Signed-off-by: ankit.varma10 <ankit.varma.ub@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #80 +/- ##
=========================================
+ Coverage 88.52% 88.62% +0.1%
=========================================
Files 96 96
Lines 2291 2304 +13
=========================================
+ Hits 2028 2042 +14
+ Misses 263 262 -1
Continue to review full report at Codecov.
|
src/jaegertracing/UDPTransport.cpp
Outdated
|
||
try { | ||
_client->emitBatch(batch); | ||
} catch (const std::logic_error &ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only logic_error
? I'd move this block to the end and replace logic_error
with exception
. That way it can be a fallback for any exception other than system_error
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey,
Sorry, was caught up in a bunch of other things.
"Why only logic error?"
The only two exceptions I see being raised from UDPClient::emitBatch were logic_error (packet size too big for a single UDP packet) and std::system_error. So, I think I could add one more handler to it for std:: exception.
catch (logic) {
}
catch (system) {
} catch (std:exception) {
}
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK cool. My idea what just skip the catch (logic) {}
and do the rest as above. logic_error
is derived from exception
so a final block catches both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah. I missed that.
Makes sense. I'll make the changes today.
@ankit-varma10 hello? |
Signed-off-by: ankit.varma10 <ankit.varma.ub@gmail.com>
Awesome. I see there is no coverage for this new code. If you don't want to add a test case, I can do it. Just let me know so I can proceed if necessary. Thanks! |
Signed-off-by: Isaac Hier <isaachier@gmail.com>
Signed-off-by: Isaac Hier <isaachier@gmail.com>
Add test case for new exception handling code
Just an interesting follow up. @manannayak pointed out to me that the |
…agent fails
Signed-off-by: ankit.varma10 ankit.varma.ub@gmail.com