Exemplo n.º 1
0
int Kernel::innerRun(ProgramArgs& args)
{
    try
    {
        // do any user-level sanity checking
        validateSwitches(args);
    }
    catch (pdal_error e)
    {
        Utils::printError(e.what());
        outputHelp(args);
        return -1;
    }

    parseCommonOptions();
    return execute();
}
Exemplo n.º 2
0
int Kernel::innerRun()
{
    // handle the well-known options
    if (m_showVersion)
    {
        outputVersion();
        return 0;
    }

    if (m_showHelp)
    {
        outputHelp();
        return 0;
    }

    if (!m_showOptions.empty())
    {
        pdal::StageFactory factory;
        std::cout << factory.toRST(m_showOptions) << std::endl;
        return 0;
    }
    try
    {
        // do any user-level sanity checking
        validateSwitches();
        collectExtraOptions();
    }
    catch (app_usage_error e)
    {
        std::string s("Usage error: ");
        printError(s + e.what());
        outputHelp();
        return 1;
    }

    return execute();
}