Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid calling `exit` from within a library #1110

abitmore opened this issue Jul 2, 2018 · 2 comments


3 participants
Copy link

commented Jul 2, 2018

Bug Description
As reported by @nanomobile at #1104 (comment), we have several code that exiting from within a library, which makes them hard to test with boost unit testing framework.


Libraries should not call exit directly, instead, should call return or throw.

Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Testing

Steps To Reproduce

  • Write a test case which will trigger the exit;
  • make and run tests/chain_test;
  • tests/chain_test will exit unexpectedly after that test case.

Expected Behavior
tests/chain_test will run all test cases.


  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

This comment has been minimized.

Copy link
Member Author

commented Jul 2, 2018

@nanomobile thanks. The editline examples should be OK.

@abitmore abitmore added this to New -Awaiting Core Team Evaluation in Project Backlog via automation Aug 17, 2018

@jmjatlanta jmjatlanta self-assigned this Jan 14, 2019

@abitmore abitmore removed this from New -Awaiting Core Team Evaluation in Project Backlog Jan 14, 2019

@abitmore abitmore added this to To do in Feature Release (201902) via automation Jan 14, 2019

@abitmore abitmore moved this from To do to In progress in Feature Release (201902) Jan 14, 2019

@jmjatlanta jmjatlanta closed this Jan 22, 2019

Feature Release (201902) automation moved this from In progress to Done Jan 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.