Browse Source

TgaImporter: more verbose error when image type is not supported.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
d17248959e
  1. 2
      src/Plugins/TgaImporter/Test/TgaImporterTest.cpp
  2. 2
      src/Plugins/TgaImporter/TgaImporter.cpp

2
src/Plugins/TgaImporter/Test/TgaImporterTest.cpp

@ -108,7 +108,7 @@ void TgaImporterTest::compressed() {
std::ostringstream debug; std::ostringstream debug;
Error::setOutput(&debug); Error::setOutput(&debug);
CORRADE_VERIFY(!importer.image2D(0)); CORRADE_VERIFY(!importer.image2D(0));
CORRADE_COMPARE(debug.str(), "Trade::TgaImporter::TgaImporter::image2D(): compressed files are not supported\n"); CORRADE_COMPARE(debug.str(), "Trade::TgaImporter::TgaImporter::image2D(): unsupported (compressed?) image type: 9\n");
} }
void TgaImporterTest::colorBits16() { void TgaImporterTest::colorBits16() {

2
src/Plugins/TgaImporter/TgaImporter.cpp

@ -133,7 +133,7 @@ ImageData2D* TgaImporter::image2D(UnsignedInt id) {
/* Compressed files */ /* Compressed files */
} else { } else {
Error() << "Trade::TgaImporter::TgaImporter::image2D(): compressed files are not supported"; Error() << "Trade::TgaImporter::TgaImporter::image2D(): unsupported (compressed?) image type:" << header.imageType;
return nullptr; return nullptr;
} }

Loading…
Cancel
Save