| 118 | |
| 119 | |
| 120 | void Stage::handleOptions() |
| 121 | { |
| 122 | addAllArgs(*m_args); |
| 123 | |
| 124 | StringList files = m_options.getValues("option_file"); |
| 125 | for (std::string& file : files) |
| 126 | m_options.addConditional(Options::fromFile(file)); |
| 127 | m_options.remove(Option("option_file", 0)); |
| 128 | |
| 129 | // Special stuff for GRiD so that no error is thrown when a file |
| 130 | // isn't found. |
| 131 | files = m_options.getValues("grid_option_file"); |
| 132 | for (std::string& file : files) |
| 133 | m_options.addConditional(Options::fromFile(file, false)); |
| 134 | m_options.remove(Option("grid_option_file", 0)); |
| 135 | |
| 136 | StringList cmdline = m_options.toCommandLine(); |
| 137 | try |
| 138 | { |
| 139 | m_args->parse(cmdline); |
| 140 | } |
| 141 | catch (arg_error error) |
| 142 | { |
| 143 | throw pdal_error(getName() + ": " + error.what()); |
| 144 | } |
| 145 | assignParsedOptions(); |
| 146 | setupLog(); |
| 147 | } |
| 148 | |
| 149 | |
| 150 | void Stage::assignParsedOptions() |
no test coverage detected