| 238 | } |
| 239 | |
| 240 | static void ReadObjectLegacy(Object& object, IReadObjectContext* context, IStream* stream) |
| 241 | { |
| 242 | try |
| 243 | { |
| 244 | object.ReadLegacy(context, stream); |
| 245 | } |
| 246 | catch (const IOException&) |
| 247 | { |
| 248 | // TODO check that ex is really EOF and not some other error |
| 249 | context->LogError(ObjectError::unexpectedEOF, "Unexpectedly reached end of file."); |
| 250 | } |
| 251 | catch (const std::exception&) |
| 252 | { |
| 253 | context->LogError(ObjectError::unknown, nullptr); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | std::unique_ptr<Object> CreateObjectFromFile(u8string_view path, bool loadImages) |
| 258 | { |
no test coverage detected