MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / Session

Method Session

Bcore/src/main/cpp/Dobby/tests/catch.hpp:9098–9125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9096} // namespace
9097
9098Session::Session() {
9099 static bool alreadyInstantiated = false;
9100 if (alreadyInstantiated) {
9101 try {
9102 CATCH_INTERNAL_ERROR("Only one instance of Catch::Session can ever be used");
9103 } catch (...) {
9104 getMutableRegistryHub().registerStartupException();
9105 }
9106 }
9107
9108 const auto &exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();
9109 if (!exceptions.empty()) {
9110 m_startupExceptions = true;
9111 Colour colourGuard(Colour::Red);
9112 Catch::cerr() << "Errors occurred during startup!" << '\n';
9113 // iterate over all exceptions and notify user
9114 for (const auto &ex_ptr : exceptions) {
9115 try {
9116 std::rethrow_exception(ex_ptr);
9117 } catch (std::exception const &ex) {
9118 Catch::cerr() << Column(ex.what()).indent(2) << '\n';
9119 }
9120 }
9121 }
9122
9123 alreadyInstantiated = true;
9124 m_cli = makeCommandLineParser(m_configData);
9125}
9126Session::~Session() {
9127 Catch::cleanUp();
9128}

Callers

nothing calls this directly

Calls 5

ColumnClass · 0.85
makeCommandLineParserFunction · 0.85
emptyMethod · 0.45
indentMethod · 0.45

Tested by

no test coverage detected