Improve some error messages

sceneinput
scrawl 9 years ago
parent 08325d14ca
commit af3b0cd883

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

@ -425,7 +425,7 @@ void OMW::Engine::setWindowIcon()
}
osgDB::ReaderWriter::ReadResult result = reader->readImage(windowIconStream);
if (!result.success())
std::cerr << "Failed to read " << windowIcon << ": " << result.message() << std::endl;
std::cerr << "Failed to read " << windowIcon << ": " << result.message() << " code " << result.status() << std::endl;
else
{
osg::ref_ptr<osg::Image> image = result.getImage();
@ -602,7 +602,7 @@ public:
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(image, outStream);
if (!result.success())
{
std::cerr << "Can't write screenshot: " << result.message() << std::endl;
std::cerr << "Can't write screenshot: " << result.message() << " code " << result.status() << std::endl;
}
}

@ -401,7 +401,7 @@ namespace MWGui
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(instream);
if (!result.success())
{
std::cerr << "Failed to read savegame screenshot: " << result.message() << std::endl;
std::cerr << "Failed to read savegame screenshot: " << result.message() << " code " << result.status() << std::endl;
return;
}

@ -361,7 +361,7 @@ namespace MWRender
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mOverlayImage, ostream);
if (!result.success())
{
std::cerr << "Can't write map overlay: " << result.message() << std::endl;
std::cerr << "Can't write map overlay: " << result.message() << " code " << result.status() << std::endl;
return;
}
@ -411,7 +411,7 @@ namespace MWRender
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(istream);
if (!result.success())
{
std::cerr << "Can't read map overlay: " << result.message() << std::endl;
std::cerr << "Can't read map overlay: " << result.message() << " code " << result.status() << std::endl;
return;
}

@ -645,7 +645,7 @@ void LocalMap::MapSegment::loadFogOfWar(const ESM::FogTexture &esm)
osgDB::ReaderWriter::ReadResult result = readerwriter->readImage(in);
if (!result.success())
{
std::cerr << "Failed to read fog: " << result.message() << std::endl;
std::cerr << "Failed to read fog: " << result.message() << " code " << result.status() << std::endl;
return;
}
@ -677,7 +677,7 @@ void LocalMap::MapSegment::saveFogOfWar(ESM::FogTexture &fog) const
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*mFogOfWarImage, ostream);
if (!result.success())
{
std::cerr << "Unable to write fog: " << result.message() << std::endl;
std::cerr << "Unable to write fog: " << result.message() << " code " << result.status() << std::endl;
return;
}
mFogOfWarImage->flipVertical();

@ -606,7 +606,7 @@ void MWState::StateManager::writeScreenshot(std::vector<char> &imageData) const
osgDB::ReaderWriter::WriteResult result = readerwriter->writeImage(*screenshot, ostream);
if (!result.success())
{
std::cerr << "Unable to write screenshot: " << result.message() << std::endl;
std::cerr << "Unable to write screenshot: " << result.message() << " code " << result.status() << std::endl;
return;
}

@ -182,7 +182,7 @@ namespace Resource
osgDB::ReaderWriter::ReadResult result = reader->readImage(*stream, opts);
if (!result.success())
{
std::cerr << "Error loading " << filename << ": " << result.message() << std::endl;
std::cerr << "Error loading " << filename << ": " << result.message() << " code " << result.status() << std::endl;
return mWarningTexture;
}

Loading…
Cancel
Save