| 331 | {} |
| 332 | |
| 333 | void PipelineReaderJSON::readPipeline(const std::string& filename) |
| 334 | { |
| 335 | std::istream* input = Utils::openFile(filename); |
| 336 | if (!input) |
| 337 | { |
| 338 | throw pdal_error("Pipeline: Unable to open stream for " |
| 339 | "file \"" + filename + "\""); |
| 340 | } |
| 341 | |
| 342 | try |
| 343 | { |
| 344 | readPipeline(*input); |
| 345 | } |
| 346 | catch (...) |
| 347 | { |
| 348 | Utils::closeFile(input); |
| 349 | throw; |
| 350 | } |
| 351 | |
| 352 | Utils::closeFile(input); |
| 353 | } |
| 354 | |
| 355 | void PipelineReaderJSON::readPipeline(std::istream& input) |
| 356 | { |