Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Removed handling of start-up exceptions from custom main docs

Commit
8b40c264341f25b57f9deea73975244008492c0b
Author
Phil Nash ·
Parents
fe05062f9e3b

Files · Download .tar.gz

Changes

 docs/own-main.md | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/docs/own-main.md b/docs/own-main.md
index 23f472e2..b1f3269f 100644
--- a/docs/own-main.md
+++ b/docs/own-main.md
@@ -39,34 +39,20 @@ If you still want Catch to process the command line, but you want to programatic
 int main( int argc, char* argv[] )
 {
   Catch::Session session; // There must be exactly one instance
-
+ 
   // writing to session.configData() here sets defaults
   // this is the preferred way to set them
-  
-  // Verify that all tests, aliases, etc registered properly
-  const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();
-  if ( !exceptions.empty() ) {
-    // iterate over all exceptions and notify user
-    for ( const auto& ex_ptr : exceptions ) {
-        try {
-            std::rethrow_exception(ex_ptr);
-        } catch (std::exception const& ex) {
-            Catch::cerr() << ex.what();
-        }
-    }
-    // Indicate that an error occured before main
-    return 1;
-  }
-  
+    
   int returnCode = session.applyCommandLine( argc, argv );
   if( returnCode != 0 ) // Indicates a command line error
-  	return returnCode;
-
+  	  return returnCode;
+ 
   // writing to session.configData() or session.Config() here 
   // overrides command line args
   // only do this if you know you need to
 
   int numFailed = session.run();
+  
   // numFailed is clamped to 255 as some unices only use the lower 8 bits.
   // This clamping has already been applied, so just return it here
   // You can also do any post run clean-up here