Return unsuccessful exit code if error occurs
This commit is contained in:
		@@ -25,6 +25,7 @@
 | 
			
		||||
//
 | 
			
		||||
// spdlog usage example
 | 
			
		||||
//
 | 
			
		||||
#include <cstdlib> // EXIT_FAILURE
 | 
			
		||||
#include <iostream>
 | 
			
		||||
#include "spdlog/spdlog.h"
 | 
			
		||||
 | 
			
		||||
@@ -106,7 +107,9 @@ int main(int, char*[])
 | 
			
		||||
    catch (const spd::spdlog_ex& ex)
 | 
			
		||||
    {
 | 
			
		||||
        std::cout << "Log failed: " << ex.what() << std::endl;
 | 
			
		||||
        return EXIT_FAILURE;
 | 
			
		||||
    }
 | 
			
		||||
    return EXIT_SUCCESS;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user