refactor: Use AbortError in FatalError#19295
Merged
maflcko merged 1 commit intobitcoin:masterfrom Jun 17, 2020
Merged
Conversation
This is needed for consistency with AbortNode
Member
|
Concept ACK. |
hebasto
approved these changes
Jun 17, 2020
|
|
||
| /** Show error message **/ | ||
| bool InitError(const bilingual_str& str); | ||
| constexpr auto AbortError = InitError; |
Member
There was a problem hiding this comment.
Why is this header selected to host this expression?
Member
Author
There was a problem hiding this comment.
It should be in a header because it is used in two places. Any suggestions where to put it?
Member
There was a problem hiding this comment.
I meant "why in this header" rather "why in header" :)
This header looks good to me. Another possible one is validation.h.
Member
There was a problem hiding this comment.
But your variant is better for a code reader, I think.
Member
|
As @achow101 noticed on IRC, this PR appears to cause the following error on Ubuntu 20.04, but not on macOS. Apparently only with |
Member
|
I'm seeing the issue on Debian as well. |
maflcko
pushed a commit
to bitcoin-core/gui
that referenced
this pull request
Jun 19, 2020
b83cc0f Fix link error with --enable-debug (Hennadii Stepanov) Pull request description: Fixes a link error on master (39bd9dd): ``` $ ./configure --enable-debug $ make ... bitcoin_wallet-bitcoin-wallet.o:(.data.rel.ro+0x0): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet_tool.a(libbitcoin_wallet_tool_a-wallettool.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-salvage.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): more undefined references to `InitError(bilingual_str const&)' follow collect2: error: ld returned 1 exit status ``` See: - bitcoin/bitcoin#19295 (comment) - bitcoin/bitcoin#19295 (comment) ACKs for top commit: achow101: Re-ACK b83cc0f Tree-SHA512: f563d978b6725284049449bb0b3a184d356f32e9b63bcadb0ba71352d3d521af3dbb4a7b4fc0a5a620ed99c357e59f62249c10d0defc0cbe7775f2c06791dabe
Fabcien
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Dec 11, 2020
Summary: ``` FatalError has been copied from AbortNode, so the two should use the same style to avoid confusion. Follow-up to #18927 ``` Backport of core [[bitcoin/bitcoin#19295 | PR19295]], [[bitcoin/bitcoin#19309 | PR19309]] and [[bitcoin/bitcoin#19331 | PR19331]]. [[bitcoin/bitcoin#19295 | PR19295]] is the original intent [[bitcoin/bitcoin#19309 | PR19309]] is a hacky bug fix [[bitcoin/bitcoin#19331 | PR19331]] reverts [[bitcoin/bitcoin#19309 | PR19309]] and fixes [[bitcoin/bitcoin#19295 | PR19295]]. In the end the relevant commits are: bitcoin/bitcoin@fa02b47 bitcoin/bitcoin@fac96e6 bitcoin/bitcoin@fa72ca6 bitcoin/bitcoin@cccc278 Depends on D8649. Test Plan: With debug: ninja all check-all Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D8650
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
FatalErrorhas been copied fromAbortNode, so the two should use the same style to avoid confusion.Follow-up to #18927