@@ -607,9 +607,11 @@ namespace utils {
607607 }
608608 }
609609 } catch (const DaemonError& e) {
610- std::cout << " Daemon error: " << e.what () << " ... exiting" << std::endl;
610+ std::cout << " 1[" << Color::Code::FG_RED << " Error" << Color::Code::FG_DEFAULT << " ] Daemonize: " << e.what ()
611+ << " ... exiting" << std::endl;
611612 } catch (const DaemonFailure& e) {
612- std::cout << " Daemon failure: " << e.what () << " ... exiting" << std::endl;
613+ std::cout << " 2[" << Color::Code::FG_RED << " Failure" << Color::Code::FG_DEFAULT << " ] Daemonize: " << e.what ()
614+ << " ... exiting" << std::endl;
613615 } catch (const DaemonSignaled& e) {
614616 std::cout << " Pid: " << getpid () << " , child pid: " << e.getPid () << " : " << e.what () << std::endl;
615617 } catch (const CLI::CallForHelp&) {
@@ -635,7 +637,8 @@ namespace utils {
635637 try {
636638 std::cout << e.getApp ()->config_to_str (true , true );
637639 } catch (const CLI::ParseError& e1 ) {
638- std::cout << " Error showing config file: " << e.getApp () << " " << e1 .get_name () << " " << e1 .what () << std::endl;
640+ std::cout << " 3[" << Color::Code::FG_RED << " Error" << Color::Code::FG_DEFAULT
641+ << " ] Showing config file: " << e.getApp () << " " << e1 .get_name () << " " << e1 .what () << std::endl;
639642 throw ;
640643 }
641644 } catch (const CLI::CallForWriteConfig& e) {
@@ -651,23 +654,24 @@ namespace utils {
651654 throw ;
652655 }
653656 } else {
654- std::cout << " Error writing config file: " << std::strerror (errno) << std::endl;
657+ std::cout << " 4[" << Color::Code::FG_RED << " Error" << Color::Code::FG_DEFAULT
658+ << " ] Writing config file: " << std::strerror (errno) << std::endl;
655659 }
656660 } catch (const CLI::ConversionError& e) {
657- std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
661+ std::cout << " 5 [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
658662 throw ;
659663 } catch (const CLI::ArgumentMismatch& e) {
660- std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
664+ std::cout << " 6 [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
661665 throw ;
662666 } catch (const CLI::ConfigError& e) {
663- std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
667+ std::cout << " 7 [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
664668 std::cout << " Adding '-w' on the command line may solve this problem" << std::endl;
665669 throw ;
666670 } catch (const CLI::ParseError& e) {
667671 const std::string what = e.what ();
668672 if (what.find (" [Option Group: " ) != std::string::npos) { // If CLI11 throws that error it means for us there are
669673 // unconfigured anonymous instances
670- std::cout << Color::Code::FG_RED << " [BootstrapError] " << Color::Code::FG_DEFAULT
674+ std::cout << Color::Code::FG_RED << e. get_name () << Color::Code::FG_DEFAULT
671675 << " Anonymous instance(s) not configured in source code " << std::endl;
672676 } else {
673677 std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << what << std::endl;
@@ -677,7 +681,7 @@ namespace utils {
677681 } catch ([[maybe_unused]] const CLI::ParseError& e) {
678682 std::cout << std::endl << " Append -h or --help to your command line for more information." << std::endl;
679683 } catch (const CLI::Error& e) {
680- std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
684+ std::cout << " [" << Color::Code::FG_RED << e.get_name () << Color::Code::FG_DEFAULT << " ] " << e.what () << std::endl;
681685
682686 std::cout << std::endl << " Append -h or --help to your command line for more information." << std::endl;
683687 }
0 commit comments