Part: [skip ci] print warning only if eof bit is not set, i.e. ignore it for empty files

This commit is contained in:
wmayer
2022-03-17 20:24:06 +01:00
parent 2e084ed18a
commit 89e4455057

View File

@@ -368,7 +368,8 @@ void PropertyPartShape::loadFromStream(Base::Reader &reader)
setValue(shape);
}
catch (const std::exception&) {
Base::Console().Warning("Failed to load BRep file %s\n", reader.getFileName().c_str());
if (!reader.eof())
Base::Console().Warning("Failed to load BRep file %s\n", reader.getFileName().c_str());
}
}