void NiceCmdLineOutput::failure(CmdLineInterface& cli, TCLAP::ArgException& e) {
	std::cerr << "Invalid command-line arguments. " << e.argId() << endl;
	std::cerr << e.error() << endl << endl;

	if (cli.hasHelpAndVersion()) {
		std::cerr << "Short usage:" << endl;
		printShortUsage(cli, std::cerr);

		std::cerr << endl << "For complete usage and help, type `" << getBinaryName() << " --help`" << endl << endl;
	} else {
		usage(cli);
	}
}
Beispiel #2
0
void VTOutput::failure(TCLAP::CmdLineInterface& c, TCLAP::ArgException& e)
{
    std::clog << "\n";
    std::clog << "  " << e.what() << "\n\n";
    usage(c);
    exit(1);
}
//----------------------------------------------------------------------------------------
void cci_cli_output::failure( tclap::CmdLineInterface& c , tclap::ArgException& e )
{
        m_tmu->color(  stamp_color::red );
        m_tmu->time_stamp();
        std::cerr << "failure in parse args : "
                  << "\n"
                  << e.what()
                  << "\n";
        m_tmu->clear_color();

        usage( c  );

        exit( 1 );
}