Exemplo n.º 1
0
Arquivo: main.cpp Projeto: trtikm/E2
int main(int argc, char* argv[])
{
    try
    {
        initialise_program_options(argc,argv);
        if (get_program_options()->helpMode())
            std::cout << get_program_options();
        else if (get_program_options()->versionMode())
            std::cout << get_program_version() << "\n";
        else
        {
            run(argc,argv);
            TMPROF_PRINT_TO_FILE(get_program_name() + "_TMPROF.html",true);
        }

    }
    catch(std::exception const& e)
    {
        try { save_crash_report(e.what()); } catch (...) {}
        return -1;
    }
    catch(...)
    {
        try { save_crash_report("Unknown exception was thrown."); } catch (...) {}
        return -2;
    }
    return 0;
}
Exemplo n.º 2
0
/*
 * menuHandler - 
 *
 */
static BOOL show_menu(char *cl) 
{
    printf ("Policy Agent CLI  Vers:%s\n" , get_program_version());
    puts(menuMsg);
    return 0;
}