Avoid core while extracting error message from future w/NULL response.#292
Merged
mpenick merged 3 commits intoapache:masterfrom Jun 8, 2016
Merged
Avoid core while extracting error message from future w/NULL response.#292mpenick merged 3 commits intoapache:masterfrom
mpenick merged 3 commits intoapache:masterfrom
Conversation
…containing NULL response.
|
Hi @angelcaban, thanks for your contribution! In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. Sincerely, |
|
Thank you @angelcaban for signing the Contribution License Agreement. Cheers, |
| } | ||
|
|
||
| result->inc_ref(); | ||
| if (result) result->inc_ref(); |
Contributor
There was a problem hiding this comment.
Thanks for the PR. This line could probably be moved into the previous check.
if (result) {
result->decode_first_row();
result->inc_ref(); // Move it here
}| *value = reinterpret_cast<const cass_byte_t*>(item.value.data()); | ||
| *value_size = item.value.size(); | ||
| return CASS_OK; | ||
| return CASS_ERROR_LIB_INTERNAL_ERROR; |
Contributor
There was a problem hiding this comment.
What do you think about creating a new error for this? I skimmed over the existing errors codes and couldn't find one that fits this type of error. I'm thinking something like 'CASS_ERROR_LIB_RESPONSE_NOT_AVAILABLE`.
mikefero
added a commit
that referenced
this pull request
Oct 25, 2019
* msvc: Enable warnings for implicit casts and address problems * clang: Enable warnings for implicit casts and address problems * `-Wconversion` for GCC is unsustainable; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752 for more context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When attempting to get future error result from future without response, got the following stack trace: