More consistent wording of errors/warnings

A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.

An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.

The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.

Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
This commit is contained in:
scrawl 2017-03-02 22:07:43 +01:00
parent 4eb5183d73
commit 29556a1802
45 changed files with 92 additions and 92 deletions

View file

@ -137,7 +137,7 @@ namespace ESSImport
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "can't write global map image, no png readerwriter found" << std::endl; std::cerr << "Error: can't write global map image, no png readerwriter found" << std::endl;
return; return;
} }
@ -146,7 +146,7 @@ namespace ESSImport
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*image2, ostream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*image2, ostream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "can't write global map image: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: can't write global map image: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }

View file

@ -38,7 +38,7 @@ namespace
{ {
if (fileHeader.mSCRS.size() != 128*128*4) if (fileHeader.mSCRS.size() != 128*128*4)
{ {
std::cerr << "unexpected screenshot size " << std::endl; std::cerr << "Error: unexpected screenshot size " << std::endl;
return; return;
} }
@ -66,14 +66,14 @@ namespace
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "can't write screenshot: no jpg readerwriter found" << std::endl; std::cerr << "Error: can't write screenshot: no jpg readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*image, ostream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*image, ostream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "can't write screenshot: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: can't write screenshot: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }
@ -333,7 +333,7 @@ namespace ESSImport
if (unknownRecords.insert(n.intval).second) if (unknownRecords.insert(n.intval).second)
{ {
std::ios::fmtflags f(std::cerr.flags()); std::ios::fmtflags f(std::cerr.flags());
std::cerr << "unknown record " << n.toString() << " (0x" << std::hex << esm.getFileOffset() << ")" << std::endl; std::cerr << "Error: unknown record " << n.toString() << " (0x" << std::hex << esm.getFileOffset() << ")" << std::endl;
std::cerr.flags(f); std::cerr.flags(f);
} }

View file

@ -421,16 +421,16 @@ void OMW::Engine::setWindowIcon()
std::string windowIcon = (mResDir / "mygui" / "openmw.png").string(); std::string windowIcon = (mResDir / "mygui" / "openmw.png").string();
windowIconStream.open(windowIcon, std::ios_base::in | std::ios_base::binary); windowIconStream.open(windowIcon, std::ios_base::in | std::ios_base::binary);
if (windowIconStream.fail()) if (windowIconStream.fail())
std::cerr << "Failed to open " << windowIcon << std::endl; std::cerr << "Error: Failed to open " << windowIcon << std::endl;
osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!reader) if (!reader)
{ {
std::cerr << "Failed to read window icon, no png readerwriter found" << std::endl; std::cerr << "Error: Failed to read window icon, no png readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::ReadResult result = reader->readImage(windowIconStream); osgDB::ReaderWriter::ReadResult result = reader->readImage(windowIconStream);
if (!result.success()) if (!result.success())
std::cerr << "Failed to read " << windowIcon << ": " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Failed to read " << windowIcon << ": " << result.message() << " code " << result.status() << std::endl;
else else
{ {
osg::ref_ptr<osg::Image> image = result.getImage(); osg::ref_ptr<osg::Image> image = result.getImage();
@ -605,14 +605,14 @@ public:
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension(mScreenshotFormat); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension(mScreenshotFormat);
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Can't write screenshot, no '" << mScreenshotFormat << "' readerwriter found" << std::endl; std::cerr << "Error: Can't write screenshot, no '" << mScreenshotFormat << "' readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(image, outStream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(image, outStream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Can't write screenshot: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Can't write screenshot: " << result.message() << " code " << result.status() << std::endl;
} }
} }

View file

@ -230,7 +230,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
engine.setCell(variables["start"].as<Files::EscapeHashString>().toStdString()); engine.setCell(variables["start"].as<Files::EscapeHashString>().toStdString());
engine.setSkipMenu (variables["skip-menu"].as<bool>(), variables["new-game"].as<bool>()); engine.setSkipMenu (variables["skip-menu"].as<bool>(), variables["new-game"].as<bool>());
if (!variables["skip-menu"].as<bool>() && variables["new-game"].as<bool>()) if (!variables["skip-menu"].as<bool>() && variables["new-game"].as<bool>())
std::cerr << "new-game used without skip-menu -> ignoring it" << std::endl; std::cerr << "Warning: new-game used without skip-menu -> ignoring it" << std::endl;
// scripts // scripts
engine.setCompileAll(variables["script-all"].as<bool>()); engine.setCompileAll(variables["script-all"].as<bool>());

View file

@ -238,7 +238,7 @@ namespace MWDialogue
if (!success) if (!success)
{ {
std::cerr std::cerr
<< "compiling failed (dialogue script)" << std::endl << "Warning: compiling failed (dialogue script)" << std::endl
<< cmd << cmd
<< std::endl << std::endl; << std::endl << std::endl;
} }

View file

@ -274,7 +274,7 @@ namespace MWGui
} }
catch (std::exception& e) catch (std::exception& e)
{ {
std::cerr << "Failed to create chargen window: " << e.what() << std::endl; std::cerr << "Error: Failed to create chargen window: " << e.what() << std::endl;
} }
} }
@ -592,7 +592,7 @@ namespace MWGui
mGenerateClass = "Mage"; mGenerateClass = "Mage";
else else
{ {
std::cerr << "Failed to deduce class from chosen answers in generate class dialog" << std::endl; std::cout << "Failed to deduce class from chosen answers in generate class dialog" << std::endl;
mGenerateClass = "Thief"; mGenerateClass = "Thief";
} }
} }

View file

@ -405,14 +405,14 @@ namespace MWGui
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Can't open savegame screenshot, no jpg readerwriter found" << std::endl; std::cerr << "Error: Can't open savegame screenshot, no jpg readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(instream); osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(instream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Failed to read savegame screenshot: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Failed to read savegame screenshot: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }

View file

@ -33,7 +33,7 @@ namespace
if (val == "linear") return "Trilinear"; if (val == "linear") return "Trilinear";
if (val == "nearest") return "Bilinear"; if (val == "nearest") return "Bilinear";
if (val != "none") if (val != "none")
std::cerr<< "Invalid texture mipmap option: "<<val <<std::endl; std::cerr<< "Warning: Invalid texture mipmap option: "<<val <<std::endl;
return "Other"; return "Other";
} }

View file

@ -162,7 +162,7 @@ namespace MWGui
const ESM::Enchantment* ench = MWBase::Environment::get().getWorld()->getStore().get<ESM::Enchantment>().search(enchId); const ESM::Enchantment* ench = MWBase::Environment::get().getWorld()->getStore().get<ESM::Enchantment>().search(enchId);
if (!ench) if (!ench)
{ {
std::cerr << "Can't find enchantment '" << enchId << "' on item " << base.getCellRef().getRefId() << std::endl; std::cerr << "Warning: Can't find enchantment '" << enchId << "' on item " << base.getCellRef().getRefId() << std::endl;
return false; return false;
} }

View file

@ -84,7 +84,7 @@ namespace MWGui
const ESM::Enchantment* enchant = esmStore.get<ESM::Enchantment>().search(enchantId); const ESM::Enchantment* enchant = esmStore.get<ESM::Enchantment>().search(enchantId);
if (!enchant) if (!enchant)
{ {
std::cerr << "Can't find enchantment '" << enchantId << "' on item " << item.getCellRef().getRefId() << std::endl; std::cerr << "Warning: Can't find enchantment '" << enchantId << "' on item " << item.getCellRef().getRefId() << std::endl;
continue; continue;
} }

View file

@ -1158,7 +1158,7 @@ namespace MWGui
{ {
if (!mStore) if (!mStore)
{ {
std::cerr << "WindowManager::onRetrieveTag: no Store set up yet, can not replace '" << tag << "'" << std::endl; std::cerr << "Error: WindowManager::onRetrieveTag: no Store set up yet, can not replace '" << tag << "'" << std::endl;
return; return;
} }
const ESM::GameSetting *setting = mStore->get<ESM::GameSetting>().find(tag); const ESM::GameSetting *setting = mStore->get<ESM::GameSetting>().find(tag);

View file

@ -1478,7 +1478,7 @@ namespace MWMechanics
} }
else else
{ {
std::cerr<< "Error in Actors::playAnimationGroup: Unable to find " << ptr.getCellRef().getRefId() << std::endl; std::cerr<< "Warning: Actors::playAnimationGroup: Unable to find " << ptr.getCellRef().getRefId() << std::endl;
return false; return false;
} }
} }

View file

@ -725,7 +725,7 @@ namespace MWMechanics
} }
else else
{ {
std::cerr<< "Attempted to play out of range idle animation \""<<idleSelect<<"\" for " << actor.getCellRef().getRefId() << std::endl; std::cerr<< "Error: Attempted to play out of range idle animation \""<<idleSelect<<"\" for " << actor.getCellRef().getRefId() << std::endl;
return false; return false;
} }
} }

View file

@ -88,7 +88,7 @@ bool Objects::playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& gro
} }
else else
{ {
std::cerr<< "Error in Objects::playAnimationGroup: Unable to find " << ptr.getCellRef().getRefId() << std::endl; std::cerr<< "Warning: Objects::playAnimationGroup: Unable to find " << ptr.getCellRef().getRefId() << std::endl;
return false; return false;
} }
} }

View file

@ -652,7 +652,7 @@ namespace MWPhysics
mPtr.getRefData().getBaseNode()->accept(visitor); mPtr.getRefData().getBaseNode()->accept(visitor);
if (!visitor.mFound) if (!visitor.mFound)
{ {
std::cerr << "animateCollisionShapes: Can't find node " << recIndex << " for " << mPtr.getCellRef().getRefId() << std::endl; std::cerr << "Error: animateCollisionShapes can't find node " << recIndex << " for " << mPtr.getCellRef().getRefId() << std::endl;
return; return;
} }
osg::NodePath nodePath = visitor.mFoundPath; osg::NodePath nodePath = visitor.mFoundPath;

View file

@ -562,7 +562,7 @@ namespace MWRender
NodeMap::const_iterator found = nodeMap.find(bonename); NodeMap::const_iterator found = nodeMap.find(bonename);
if (found == nodeMap.end()) if (found == nodeMap.end())
{ {
std::cerr << "addAnimSource: can't find bone '" + bonename << "' in " << model << " (referenced by " << kfname << ")" << std::endl; std::cerr << "Warning: addAnimSource: can't find bone '" + bonename << "' in " << model << " (referenced by " << kfname << ")" << std::endl;
continue; continue;
} }
@ -1697,12 +1697,12 @@ namespace MWRender
PartHolder::~PartHolder() PartHolder::~PartHolder()
{ {
if (mNode.get() && !mNode->getNumParents()) if (mNode.get() && !mNode->getNumParents())
std::cerr << "Warning: part has no parents " << std::endl; std::cerr << "Error: part has no parents " << std::endl;
if (mNode.get() && mNode->getNumParents()) if (mNode.get() && mNode->getNumParents())
{ {
if (mNode->getNumParents() > 1) if (mNode->getNumParents() > 1)
std::cerr << "Warning: part has multiple parents " << mNode->getNumParents() << " " << mNode.get() << std::endl; std::cerr << "Error: part has multiple parents " << mNode->getNumParents() << " " << mNode.get() << std::endl;
mNode->getParent(0)->removeChild(mNode); mNode->getParent(0)->removeChild(mNode);
} }
} }

View file

@ -155,7 +155,7 @@ void CreatureWeaponAnimation::updatePart(PartHolderPtr& scene, int slot)
} }
catch (std::exception& e) catch (std::exception& e)
{ {
std::cerr << "Error adding creature part: " << e.what() << std::endl; std::cerr << "Can not add creature part: " << e.what() << std::endl;
} }
} }

View file

@ -408,14 +408,14 @@ namespace MWRender
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Can't write map overlay: no png readerwriter found" << std::endl; std::cerr << "Error: Can't write map overlay: no png readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mOverlayImage, ostream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mOverlayImage, ostream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Can't write map overlay: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Can't write map overlay: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }
@ -460,14 +460,14 @@ namespace MWRender
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Can't read map overlay: no png readerwriter found" << std::endl; std::cerr << "Error: Can't read map overlay: no png readerwriter found" << std::endl;
return; return;
} }
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(istream); osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(istream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Can't read map overlay: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Can't read map overlay: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }
@ -569,7 +569,7 @@ namespace MWRender
CameraVector::iterator found = std::find(mActiveCameras.begin(), mActiveCameras.end(), camera); CameraVector::iterator found = std::find(mActiveCameras.begin(), mActiveCameras.end(), camera);
if (found == mActiveCameras.end()) if (found == mActiveCameras.end())
{ {
std::cerr << "GlobalMap trying to remove an inactive camera" << std::endl; std::cerr << "Error: GlobalMap trying to remove an inactive camera" << std::endl;
return; return;
} }
mActiveCameras.erase(found); mActiveCameras.erase(found);

View file

@ -320,7 +320,7 @@ void LocalMap::markForRemoval(osg::Camera *cam)
CameraVector::iterator found = std::find(mActiveCameras.begin(), mActiveCameras.end(), cam); CameraVector::iterator found = std::find(mActiveCameras.begin(), mActiveCameras.end(), cam);
if (found == mActiveCameras.end()) if (found == mActiveCameras.end())
{ {
std::cerr << "trying to remove an inactive camera" << std::endl; std::cerr << "Error: trying to remove an inactive camera" << std::endl;
return; return;
} }
mActiveCameras.erase(found); mActiveCameras.erase(found);
@ -487,7 +487,7 @@ void LocalMap::requestInteriorMap(const MWWorld::CellStore* cell)
// We are using the same bounds and angle as we were using when the textures were originally made. Segments should come out the same. // We are using the same bounds and angle as we were using when the textures were originally made. Segments should come out the same.
if (i >= int(fog->mFogTextures.size())) if (i >= int(fog->mFogTextures.size()))
{ {
std::cout << "Warning: fog texture count mismatch" << std::endl; std::cout << "Error: fog texture count mismatch" << std::endl;
break; break;
} }
@ -679,7 +679,7 @@ void LocalMap::MapSegment::loadFogOfWar(const ESM::FogTexture &esm)
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("tga"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("tga");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Unable to load fog, can't find a tga ReaderWriter" << std::endl; std::cerr << "Error: Unable to load fog, can't find a tga ReaderWriter" << std::endl;
return; return;
} }
@ -688,7 +688,7 @@ void LocalMap::MapSegment::loadFogOfWar(const ESM::FogTexture &esm)
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(in); osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(in);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Failed to read fog: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Failed to read fog: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }
@ -711,7 +711,7 @@ void LocalMap::MapSegment::saveFogOfWar(ESM::FogTexture &fog) const
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("tga"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("tga");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Unable to write fog, can't find a tga ReaderWriter" << std::endl; std::cerr << "Error: Unable to write fog, can't find a tga ReaderWriter" << std::endl;
return; return;
} }
@ -720,7 +720,7 @@ void LocalMap::MapSegment::saveFogOfWar(ESM::FogTexture &fog) const
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mFogOfWarImage, ostream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mFogOfWarImage, ostream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Unable to write fog: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Unable to write fog: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }
mFogOfWarImage->flipVertical(); mFogOfWarImage->flipVertical();

View file

@ -435,7 +435,7 @@ void NpcAnimation::updateNpcBase()
if (bp) if (bp)
mHeadModel = "meshes\\" + bp->mModel; mHeadModel = "meshes\\" + bp->mModel;
else else
std::cerr << "Failed to load body part '" << mNpc->mHead << "'" << std::endl; std::cerr << "Warning: Failed to load body part '" << mNpc->mHead << "'" << std::endl;
} }
mHairModel = ""; mHairModel = "";
@ -445,7 +445,7 @@ void NpcAnimation::updateNpcBase()
if (bp) if (bp)
mHairModel = "meshes\\" + bp->mModel; mHairModel = "meshes\\" + bp->mModel;
else else
std::cerr << "Failed to load body part '" << mNpc->mHair << "'" << std::endl; std::cerr << "Warning: Failed to load body part '" << mNpc->mHair << "'" << std::endl;
} }
} }
@ -828,7 +828,7 @@ void NpcAnimation::addPartGroup(int group, int priority, const std::vector<ESM::
bodypart = NULL; bodypart = NULL;
} }
else if (!bodypart) else if (!bodypart)
std::cerr << "Failed to find body part '" << part->mFemale << "'" << std::endl; std::cerr << "Warning: Failed to find body part '" << part->mFemale << "'" << std::endl;
} }
if(!bodypart && !part->mMale.empty()) if(!bodypart && !part->mMale.empty())
{ {
@ -843,7 +843,7 @@ void NpcAnimation::addPartGroup(int group, int priority, const std::vector<ESM::
bodypart = NULL; bodypart = NULL;
} }
else if (!bodypart) else if (!bodypart)
std::cerr << "Failed to find body part '" << part->mMale << "'" << std::endl; std::cerr << "Warning: Failed to find body part '" << part->mMale << "'" << std::endl;
} }
if(bodypart) if(bodypart)

View file

@ -197,16 +197,16 @@ osg::ref_ptr<osg::Image> readPngImage (const std::string& file)
boost::filesystem::ifstream inStream; boost::filesystem::ifstream inStream;
inStream.open(file, std::ios_base::in | std::ios_base::binary); inStream.open(file, std::ios_base::in | std::ios_base::binary);
if (inStream.fail()) if (inStream.fail())
std::cerr << "Failed to open " << file << std::endl; std::cerr << "Error: Failed to open " << file << std::endl;
osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* reader = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!reader) if (!reader)
{ {
std::cerr << "Failed to read " << file << ", no png readerwriter found" << std::endl; std::cerr << "Error: Failed to read " << file << ", no png readerwriter found" << std::endl;
return osg::ref_ptr<osg::Image>(); return osg::ref_ptr<osg::Image>();
} }
osgDB::ReaderWriter::ReadResult result = reader->readImage(inStream); osgDB::ReaderWriter::ReadResult result = reader->readImage(inStream);
if (!result.success()) if (!result.success())
std::cerr << "Failed to read " << file << ": " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Failed to read " << file << ": " << result.message() << " code " << result.status() << std::endl;
return result.getImage(); return result.getImage();
} }

View file

@ -65,14 +65,14 @@ namespace MWScript
} }
catch (const std::exception& error) catch (const std::exception& error)
{ {
std::cerr << "An exception has been thrown: " << error.what() << std::endl; std::cerr << "Error: An exception has been thrown: " << error.what() << std::endl;
Success = false; Success = false;
} }
if (!Success) if (!Success)
{ {
std::cerr std::cerr
<< "compiling failed: " << name << std::endl; << "Warning: compiling failed: " << name << std::endl;
} }
if (Success) if (Success)

View file

@ -235,7 +235,7 @@ namespace MWScript
if (R()(runtime, false, true).isEmpty()) if (R()(runtime, false, true).isEmpty())
{ {
std::cerr std::cerr
<< "Compensating for broken script in Morrowind.esm by " << "Warning: Compensating for broken script in Morrowind.esm by "
<< "ignoring remote access to dagoth_ur_1" << std::endl; << "ignoring remote access to dagoth_ur_1" << std::endl;
return; return;
} }

View file

@ -307,7 +307,7 @@ namespace MWScript
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy); store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
if(!cell) if(!cell)
{ {
std::string error = "PositionCell: unknown interior cell (" + cellID + "), moving to exterior instead"; std::string error = "Warning: PositionCell: unknown interior cell (" + cellID + "), moving to exterior instead";
runtime.getContext().report (error); runtime.getContext().report (error);
std::cerr << error << std::endl; std::cerr << error << std::endl;
} }

View file

@ -471,7 +471,7 @@ void MWState::StateManager::loadGame (const Character *character, const std::str
default: default:
// ignore invalid records // ignore invalid records
std::cerr << "Ignoring unknown record: " << n.toString() << std::endl; std::cerr << "Warning: Ignoring unknown record: " << n.toString() << std::endl;
reader.skipRecord(); reader.skipRecord();
} }
int progressPercent = static_cast<int>(float(reader.getFileOffset())/total*100); int progressPercent = static_cast<int>(float(reader.getFileOffset())/total*100);
@ -613,7 +613,7 @@ bool MWState::StateManager::verifyProfile(const ESM::SavedGame& profile) const
if (std::find(selectedContentFiles.begin(), selectedContentFiles.end(), *it) if (std::find(selectedContentFiles.begin(), selectedContentFiles.end(), *it)
== selectedContentFiles.end()) == selectedContentFiles.end())
{ {
std::cerr << "Savegame dependency " << *it << " is missing." << std::endl; std::cerr << "Warning: Savegame dependency " << *it << " is missing." << std::endl;
notFound = true; notFound = true;
} }
} }
@ -641,7 +641,7 @@ void MWState::StateManager::writeScreenshot(std::vector<char> &imageData) const
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("jpg");
if (!readerwriter) if (!readerwriter)
{ {
std::cerr << "Unable to write screenshot, can't find a jpg ReaderWriter" << std::endl; std::cerr << "Error: Unable to write screenshot, can't find a jpg ReaderWriter" << std::endl;
return; return;
} }
@ -649,7 +649,7 @@ void MWState::StateManager::writeScreenshot(std::vector<char> &imageData) const
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*screenshot, ostream); osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*screenshot, ostream);
if (!result.success()) if (!result.success())
{ {
std::cerr << "Unable to write screenshot: " << result.message() << " code " << result.status() << std::endl; std::cerr << "Error: Unable to write screenshot: " << result.message() << " code " << result.status() << std::endl;
return; return;
} }

View file

@ -209,12 +209,12 @@ namespace MWWorld
{ {
if (!mWorkQueue) if (!mWorkQueue)
{ {
std::cerr << "can't preload, no work queue set " << std::endl; std::cerr << "Error: can't preload, no work queue set " << std::endl;
return; return;
} }
if (cell->getState() == CellStore::State_Unloaded) if (cell->getState() == CellStore::State_Unloaded)
{ {
std::cerr << "can't preload objects for unloaded cell" << std::endl; std::cerr << "Error: can't preload objects for unloaded cell" << std::endl;
return; return;
} }

View file

@ -349,7 +349,7 @@ bool MWWorld::Cells::readRecord (ESM::ESMReader& reader, uint32_t type,
catch (...) catch (...)
{ {
// silently drop cells that don't exist anymore // silently drop cells that don't exist anymore
std::cerr << "Dropping state for cell " << state.mId.mWorldspace << " (cell no longer exists)" << std::endl; std::cerr << "Warning: Dropping state for cell " << state.mId.mWorldspace << " (cell no longer exists)" << std::endl;
reader.skipRecord(); reader.skipRecord();
return true; return true;
} }

View file

@ -138,7 +138,7 @@ namespace
return; return;
} }
std::cerr << "Dropping reference to " << state.mRef.mRefID << " (invalid content file link)" << std::endl; std::cerr << "Warning: Dropping reference to " << state.mRef.mRefID << " (invalid content file link)" << std::endl;
return; return;
} }
@ -197,7 +197,7 @@ namespace MWWorld
else else
{ {
std::cerr std::cerr
<< "Error: could not resolve cell reference '" << ref.mRefID << "'" << "Warning: could not resolve cell reference '" << ref.mRefID << "'"
<< " (dropping reference)" << std::endl; << " (dropping reference)" << std::endl;
} }
} }
@ -667,7 +667,7 @@ namespace MWWorld
default: default:
std::cerr std::cerr
<< "WARNING: Ignoring reference '" << ref.mRefID << "' of unhandled type\n"; << "Error: Ignoring reference '" << ref.mRefID << "' of unhandled type\n";
return; return;
} }
@ -898,7 +898,7 @@ namespace MWWorld
if (!visitor.mFound) if (!visitor.mFound)
{ {
std::cerr << "Dropping moved ref tag for " << refnum.mIndex << " (moved object no longer exists)" << std::endl; std::cerr << "Warning: Dropping moved ref tag for " << refnum.mIndex << " (moved object no longer exists)" << std::endl;
continue; continue;
} }
@ -908,7 +908,7 @@ namespace MWWorld
if (otherCell == NULL) if (otherCell == NULL)
{ {
std::cerr << "Dropping moved ref tag for " << movedRef->mRef.getRefId() std::cerr << "Warning: Dropping moved ref tag for " << movedRef->mRef.getRefId()
<< " (target cell " << movedTo.mWorldspace << " no longer exists). Reference moved back to its original location." << std::endl; << " (target cell " << movedTo.mWorldspace << " no longer exists). Reference moved back to its original location." << std::endl;
// Note by dropping tag the object will automatically re-appear in its original cell, though potentially at inapproriate coordinates. // Note by dropping tag the object will automatically re-appear in its original cell, though potentially at inapproriate coordinates.
// Restore original coordinates: // Restore original coordinates:

View file

@ -496,7 +496,7 @@ void MWWorld::ContainerStore::addInitialItem (const std::string& id, const std::
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {
std::cerr << "Error in MWWorld::ContainerStore::addInitialItem: " << e.what() << std::endl; std::cerr << "Warning: MWWorld::ContainerStore::addInitialItem: " << e.what() << std::endl;
} }
} }
@ -796,10 +796,10 @@ void MWWorld::ContainerStore::readState (const ESM::InventoryState& inventory)
case ESM::REC_WEAP: readEquipmentState (getState (weapons, state), thisIndex, inventory); break; case ESM::REC_WEAP: readEquipmentState (getState (weapons, state), thisIndex, inventory); break;
case ESM::REC_LIGH: readEquipmentState (getState (lights, state), thisIndex, inventory); break; case ESM::REC_LIGH: readEquipmentState (getState (lights, state), thisIndex, inventory); break;
case 0: case 0:
std::cerr << "Dropping reference to '" << state.mRef.mRefID << "' (object no longer exists)" << std::endl; std::cerr << "Warning: Dropping reference to '" << state.mRef.mRefID << "' (object no longer exists)" << std::endl;
break; break;
default: default:
std::cerr << "Invalid item type in inventory state, refid " << state.mRef.mRefID << std::endl; std::cerr << "Warning: Invalid item type in inventory state, refid " << state.mRef.mRefID << std::endl;
break; break;
} }
} }

View file

@ -851,7 +851,7 @@ void MWWorld::InventoryStore::updateRechargingItems()
enchantmentId); enchantmentId);
if (!enchantment) if (!enchantment)
{ {
std::cerr << "Can't find enchantment '" << enchantmentId << "' on item " << it->getCellRef().getRefId() << std::endl; std::cerr << "Warning: Can't find enchantment '" << enchantmentId << "' on item " << it->getCellRef().getRefId() << std::endl;
continue; continue;
} }

View file

@ -39,7 +39,7 @@ void MWWorld::LiveCellRefBase::loadImp (const ESM::ObjectState& state)
catch (const std::exception& exception) catch (const std::exception& exception)
{ {
std::cerr std::cerr
<< "failed to load state for local script " << scriptId << "Error: failed to load state for local script " << scriptId
<< " because an exception has been thrown: " << exception.what() << " because an exception has been thrown: " << exception.what()
<< std::endl; << std::endl;
} }

View file

@ -93,7 +93,7 @@ void MWWorld::LocalScripts::add (const std::string& scriptName, const Ptr& ptr)
for (std::list<std::pair<std::string, Ptr> >::iterator iter = mScripts.begin(); iter!=mScripts.end(); ++iter) for (std::list<std::pair<std::string, Ptr> >::iterator iter = mScripts.begin(); iter!=mScripts.end(); ++iter)
if (iter->second==ptr) if (iter->second==ptr)
{ {
std::cerr << "warning, tried to add local script twice for " << ptr.getCellRef().getRefId() << std::endl; std::cerr << "Error: tried to add local script twice for " << ptr.getCellRef().getRefId() << std::endl;
remove(ptr); remove(ptr);
break; break;
} }

View file

@ -330,7 +330,7 @@ namespace MWWorld
if (!player.mObject.mEnabled) if (!player.mObject.mEnabled)
{ {
std::cerr << "Savegame attempted to disable the player." << std::endl; std::cerr << "Warning: Savegame attempted to disable the player." << std::endl;
player.mObject.mEnabled = true; player.mObject.mEnabled = true;
} }
@ -357,7 +357,7 @@ namespace MWWorld
} }
catch (...) catch (...)
{ {
std::cerr << "Player cell '" << player.mCellId.mWorldspace << "' no longer exists" << std::endl; std::cerr << "Warning: Player cell '" << player.mCellId.mWorldspace << "' no longer exists" << std::endl;
// Cell no longer exists. The loader will have to choose a default cell. // Cell no longer exists. The loader will have to choose a default cell.
mCellStore = NULL; mCellStore = NULL;
} }

View file

@ -149,7 +149,7 @@ namespace
} }
catch (const std::exception& e) catch (const std::exception& e)
{ {
std::string error ("error during rendering '" + ptr.getCellRef().getRefId() + "': "); std::string error ("failed to render '" + ptr.getCellRef().getRefId() + "': ");
std::cerr << error + e.what() << std::endl; std::cerr << error + e.what() << std::endl;
} }
} }
@ -625,7 +625,7 @@ namespace MWWorld
} }
catch (std::exception& e) catch (std::exception& e)
{ {
std::cerr << "error during rendering '" << ptr.getCellRef().getRefId() << "': " << e.what() << std::endl; std::cerr << "failed to render '" << ptr.getCellRef().getRefId() << "': " << e.what() << std::endl;
} }
} }

View file

@ -687,7 +687,7 @@ namespace MWWorld
if (it_lease != wipecell->mLeasedRefs.end()) if (it_lease != wipecell->mLeasedRefs.end())
wipecell->mLeasedRefs.erase(it_lease); wipecell->mLeasedRefs.erase(it_lease);
else else
std::cerr << "can't find " << it->mRefNum.mIndex << " " << it->mRefNum.mContentFile << " in leasedRefs " << std::endl; std::cerr << "Error: can't find " << it->mRefNum.mIndex << " " << it->mRefNum.mContentFile << " in leasedRefs " << std::endl;
} }
*itold = *it; *itold = *it;
} }

View file

@ -128,7 +128,7 @@ namespace ESM
return; return;
} }
std::cerr << "Failed to insert info " << info.mId << std::endl; std::cerr << "Warning: Failed to insert info " << info.mId << std::endl;
} }
void Dialogue::clearDeletedInfos() void Dialogue::clearDeletedInfos()

View file

@ -319,7 +319,7 @@ namespace ESMTerrain
const ESM::LandTexture* ltex = getLandTexture(id.first-1, id.second); const ESM::LandTexture* ltex = getLandTexture(id.first-1, id.second);
if (!ltex) if (!ltex)
{ {
std::cerr << "Unable to find land texture index " << id.first-1 << " in plugin " << id.second << ", using default texture instead" << std::endl; std::cerr << "Warning: Unable to find land texture index " << id.first-1 << " in plugin " << id.second << ", using default texture instead" << std::endl;
return defaultTexture; return defaultTexture;
} }

View file

@ -191,7 +191,7 @@ namespace Interpreter{
} }
catch (std::exception& e) catch (std::exception& e)
{ {
std::cerr << "Failed to replace escape character, with the following error: " << e.what() << std::endl; std::cerr << "Error: Failed to replace escape character, with the following error: " << e.what() << std::endl;
std::cerr << "Full text below: " << std::endl << text << std::endl; std::cerr << "Full text below: " << std::endl << text << std::endl;
} }

View file

@ -1364,7 +1364,7 @@ namespace NifOsg
size_t mipSize = mip.height * mip.width * pixelData->bpp / 8; size_t mipSize = mip.height * mip.width * pixelData->bpp / 8;
if (mipSize + mip.dataOffset > pixelData->data.size()) if (mipSize + mip.dataOffset > pixelData->data.size())
{ {
std::cerr << "Internal texture's mipmap data out of bounds" << std::endl; std::cerr << "Warning: Internal texture's mipmap data out of bounds, ignoring texture" << std::endl;
return NULL; return NULL;
} }
@ -1379,7 +1379,7 @@ namespace NifOsg
if (width <= 0 || height <= 0) if (width <= 0 || height <= 0)
{ {
std::cerr << "Width and height must be non zero " << std::endl; std::cerr << "Warning: Internal Texture Width and height must be non zero, ignoring texture" << std::endl;
return NULL; return NULL;
} }
@ -1421,7 +1421,7 @@ namespace NifOsg
{ {
// Not used by the vanilla engine. MCP (Morrowind Code Patch) adds an option to use Gloss maps: // Not used by the vanilla engine. MCP (Morrowind Code Patch) adds an option to use Gloss maps:
// "- Gloss map fix. Morrowind removed gloss map entries from model files after loading them. This stops Morrowind from removing them." // "- Gloss map fix. Morrowind removed gloss map entries from model files after loading them. This stops Morrowind from removing them."
std::cerr << "NiTexturingProperty::GlossTexture in " << mFilename << " not currently used." << std::endl; //std::cerr << "NiTexturingProperty::GlossTexture in " << mFilename << " not currently used." << std::endl;
continue; continue;
} }
default: default:

View file

@ -284,7 +284,7 @@ void Emitter::emitParticles(double dt)
if (!visitor.mFound) if (!visitor.mFound)
{ {
std::cerr << "Emitter: Can't find emitter node" << randomRecIndex << std::endl; std::cerr << "Error: Can't find emitter node" << randomRecIndex << std::endl;
return; return;
} }

View file

@ -613,12 +613,12 @@ namespace Resource
if(magfilter == "nearest") if(magfilter == "nearest")
mag = osg::Texture::NEAREST; mag = osg::Texture::NEAREST;
else if(magfilter != "linear") else if(magfilter != "linear")
std::cerr<< "Invalid texture mag filter: "<<magfilter <<std::endl; std::cerr<< "Warning: Invalid texture mag filter: "<<magfilter <<std::endl;
if(minfilter == "nearest") if(minfilter == "nearest")
min = osg::Texture::NEAREST; min = osg::Texture::NEAREST;
else if(minfilter != "linear") else if(minfilter != "linear")
std::cerr<< "Invalid texture min filter: "<<minfilter <<std::endl; std::cerr<< "Warning: Invalid texture min filter: "<<minfilter <<std::endl;
if(mipmap == "nearest") if(mipmap == "nearest")
{ {
@ -630,7 +630,7 @@ namespace Resource
else if(mipmap != "none") else if(mipmap != "none")
{ {
if(mipmap != "linear") if(mipmap != "linear")
std::cerr<< "Invalid texture mipmap: "<<mipmap <<std::endl; std::cerr<< "Warning: Invalid texture mipmap: "<<mipmap <<std::endl;
if(min == osg::Texture::NEAREST) if(min == osg::Texture::NEAREST)
min = osg::Texture::NEAREST_MIPMAP_LINEAR; min = osg::Texture::NEAREST_MIPMAP_LINEAR;
else if(min == osg::Texture::LINEAR) else if(min == osg::Texture::LINEAR)

View file

@ -63,7 +63,7 @@ namespace SceneUtil
{ {
osg::ref_ptr<osg::Node> node = *it; osg::ref_ptr<osg::Node> node = *it;
if (node->getNumParents() > 1) if (node->getNumParents() > 1)
std::cerr << "CopyRigVisitor warning: node has multiple parents" << std::endl; std::cerr << "Error CopyRigVisitor: node has multiple parents" << std::endl;
while (node->getNumParents()) while (node->getNumParents())
node->getParent(0)->removeChild(node); node->getParent(0)->removeChild(node);

View file

@ -162,13 +162,13 @@ bool RigGeometry::initFromParentSkeleton(osg::NodeVisitor* nv)
if (!mSkeleton) if (!mSkeleton)
{ {
std::cerr << "A RigGeometry did not find its parent skeleton" << std::endl; std::cerr << "Error: A RigGeometry did not find its parent skeleton" << std::endl;
return false; return false;
} }
if (!mInfluenceMap) if (!mInfluenceMap)
{ {
std::cerr << "No InfluenceMap set on RigGeometry" << std::endl; std::cerr << "Error: No InfluenceMap set on RigGeometry" << std::endl;
return false; return false;
} }
@ -179,7 +179,7 @@ bool RigGeometry::initFromParentSkeleton(osg::NodeVisitor* nv)
Bone* bone = mSkeleton->getBone(it->first); Bone* bone = mSkeleton->getBone(it->first);
if (!bone) if (!bone)
{ {
std::cerr << "RigGeometry did not find bone " << it->first << std::endl; std::cerr << "Error: RigGeometry did not find bone " << it->first << std::endl;
continue; continue;
} }
@ -232,7 +232,7 @@ void RigGeometry::update(osg::NodeVisitor* nv)
{ {
if (!mSkeleton) if (!mSkeleton)
{ {
std::cerr << "RigGeometry rendering with no skeleton, should have been initialized by UpdateVisitor" << std::endl; std::cerr << "Error: RigGeometry rendering with no skeleton, should have been initialized by UpdateVisitor" << std::endl;
// try to recover anyway, though rendering is likely to be incorrect. // try to recover anyway, though rendering is likely to be incorrect.
if (!initFromParentSkeleton(nv)) if (!initFromParentSkeleton(nv))
return; return;

View file

@ -128,7 +128,7 @@ void Skeleton::updateBoneMatrices(unsigned int traversalNumber)
mRootBone->mChildren[i]->update(NULL); mRootBone->mChildren[i]->update(NULL);
} }
else else
std::cerr << "no root bone" << std::endl; std::cerr << "Error: no root bone" << std::endl;
mNeedToUpdateBoneMatrices = false; mNeedToUpdateBoneMatrices = false;
} }
@ -188,7 +188,7 @@ void Bone::update(const osg::Matrixf* parentMatrixInSkeletonSpace)
{ {
if (!mNode) if (!mNode)
{ {
std::cerr << "Bone without node " << std::endl; std::cerr << "Error: Bone without node " << std::endl;
return; return;
} }
if (parentMatrixInSkeletonSpace) if (parentMatrixInSkeletonSpace)

View file

@ -71,7 +71,7 @@ void WorkQueue::addWorkItem(osg::ref_ptr<WorkItem> item, bool front)
{ {
if (item->isDone()) if (item->isDone())
{ {
std::cerr << "warning, trying to add a work item that is already completed" << std::endl; std::cerr << "Error: trying to add a work item that is already completed" << std::endl;
return; return;
} }