Make bitcoind invalid argument error message specific #10447

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2017_05_bitcoind_commandline_error changing 1 files +7 −10
  1. laanwj commented at 7:31 AM on May 24, 2017: member

    The current message is not helpful. Hardly anyone even remembers that bitcoind used to be a cli utility, let alone new users. Print what the actual problem is.

    Inspired by discussion here: #10402 (comment)

    Also remove the check for bitcoin: URIs. The expected output when accidentally passing a bitcoin: URI to bitcoind instead of bitcoin-qt would be an error not silent acceptance.

  2. laanwj added the label Docs and Output on May 24, 2017
  3. jonasschnelli commented at 7:33 AM on May 24, 2017: contributor

    I guess most users already interpret [...]There is no RPC client functionality [...] as "oh I missed a dash somewhere"....

    utACK 8ec3a6bebb7c7d2a739e8827e3e0509638172504

  4. laanwj commented at 7:35 AM on May 24, 2017: member

    I guess most users already interpret [...]There is no RPC client functionality [...] as "oh I missed a dash somewhere"....

    Yeah.... "somewhere" :-)

  5. fanquake commented at 7:39 AM on May 24, 2017: member

    utACK 8ec3a6b

  6. Make bitcoind invalid argument error message specific
    The current message is not helpful. Hardly anyone even remembers that
    bitcoind used to be a cli utility, let alone new users. Print what the
    actual problem is.
    cd5622dcaf
  7. in src/bitcoind.cpp:122 in 8ec3a6bebb outdated
     127 | -        {
     128 | -            fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
     129 | -            exit(EXIT_FAILURE);
     130 | +        // Error out when loose non-argument tokens are encountered on command line
     131 | +        for (int i = 1; i < argc; i++) {
     132 | +            if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitcoin:")) {
    


    laanwj commented at 7:40 AM on May 24, 2017:

    another realization - why are we checking for "bitcoin:" URLs at all bitcoind.cpp? Shouldn't they be treated as invalid tokens as well?

  8. laanwj force-pushed on May 24, 2017
  9. sipa commented at 1:23 AM on May 25, 2017: member

    utACK cd5622dcaf55ba08d33574e36bbd21be76aa3513

  10. jtimon commented at 4:47 PM on May 31, 2017: contributor

    utACK cd5622dcaf55ba08d33574e36bbd21be76aa3513

  11. laanwj merged this on Jun 1, 2017
  12. laanwj closed this on Jun 1, 2017

  13. laanwj referenced this in commit f259263a7b on Jun 1, 2017
  14. PastaPastaPasta referenced this in commit 9972963aa7 on Jun 20, 2019
  15. PastaPastaPasta referenced this in commit 76bbb583b4 on Jun 20, 2019
  16. PastaPastaPasta referenced this in commit f3ef204460 on Jun 22, 2019
  17. PastaPastaPasta referenced this in commit ec996f6769 on Jun 22, 2019
  18. PastaPastaPasta referenced this in commit f6e277d94d on Jun 22, 2019
  19. PastaPastaPasta referenced this in commit eaac0483b7 on Jun 22, 2019
  20. PastaPastaPasta referenced this in commit 8ea310119a on Jun 22, 2019
  21. PastaPastaPasta referenced this in commit c38178b591 on Jun 22, 2019
  22. PastaPastaPasta referenced this in commit 1423b99538 on Jun 22, 2019
  23. PastaPastaPasta referenced this in commit 8aa0aa05b9 on Jun 22, 2019
  24. PastaPastaPasta referenced this in commit 975d2ddd53 on Jun 22, 2019
  25. PastaPastaPasta referenced this in commit b4c8968b88 on Jun 22, 2019
  26. PastaPastaPasta referenced this in commit 12e830e55b on Jun 22, 2019
  27. PastaPastaPasta referenced this in commit 89e033085d on Jun 24, 2019
  28. barrystyle referenced this in commit da8a505589 on Jan 22, 2020
  29. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me