diff options
| author | Chris Thrasher | 2025-04-25 23:32:34 -0600 |
|---|---|---|
| committer | Chris Thrasher | 2025-04-29 09:26:28 -0600 |
| commit | 5abfc0aa9c1ef4cb40c9f387495134dab02e1af2 (patch) | |
| tree | 8cf1636bf151a0de6ed81617532a0336e69b1896 /docs | |
| parent | 1e7b879fae7896b9222b8fefc11fea3f24864103 (diff) | |
| download | catch3-5abfc0aa9c1ef4cb40c9f387495134dab02e1af2.tar.gz | |
Add return code constants to API
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/own-main.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/own-main.md b/docs/own-main.md index 26dfa86d..4cc21b15 100644 --- a/docs/own-main.md +++ b/docs/own-main.md @@ -57,17 +57,18 @@ int main( int argc, char* argv[] ) { 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(); + returnCode = session.run(); + + // returnCode encodes the type of error that occured. See the + // integer constants in catch_session.hpp for more information + // on what each return code means. - // 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 return numFailed; } ``` |