| 61 | } |
| 62 | |
| 63 | void MapResourceLoader::loadInfoFile(std::istream& stream, const RootNodePtr& root) |
| 64 | { |
| 65 | if (!stream.good()) |
| 66 | { |
| 67 | rError() << "[MapResource] No valid info file stream" << std::endl; |
| 68 | return; |
| 69 | } |
| 70 | |
| 71 | rMessage() << "Parsing info file..." << std::endl; |
| 72 | |
| 73 | try |
| 74 | { |
| 75 | // Read the infofile |
| 76 | InfoFile infoFile(stream, root, _indexMapping); |
| 77 | |
| 78 | // Start parsing, this will throw if any errors occur |
| 79 | infoFile.parse(); |
| 80 | } |
| 81 | catch (parser::ParseException& e) |
| 82 | { |
| 83 | rError() << "[MapResource] Unable to parse info file: " << e.what() << std::endl; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | } |
no test coverage detected