diff --git a/src/WallpaperEngine/Assets/CPackage.cpp b/src/WallpaperEngine/Assets/CPackage.cpp index acc1763..e90b808 100644 --- a/src/WallpaperEngine/Assets/CPackage.cpp +++ b/src/WallpaperEngine/Assets/CPackage.cpp @@ -3,6 +3,7 @@ #include "CPackageLoadException.h" #include +#include using namespace WallpaperEngine::Assets; @@ -99,20 +100,26 @@ void CPackage::validateHeader (FILE* fp) char* pointer = this->readSizedString (fp); // finally validate the header version - if (strcmp ("PKGV0007", pointer) != 0 && + if (strcmp ("PKGV0001", pointer) != 0 && strcmp ("PKGV0002", pointer) != 0 && - strcmp ("PKGV0001", pointer) != 0 && - strcmp ("PKGV0008", pointer) != 0 && - strcmp ("PKGV0009", pointer) != 0 && + strcmp ("PKGV0003", pointer) != 0 && strcmp ("PKGV0004", pointer) != 0 && strcmp ("PKGV0005", pointer) != 0 && strcmp ("PKGV0006", pointer) != 0 && + strcmp ("PKGV0007", pointer) != 0 && + strcmp ("PKGV0008", pointer) != 0 && + strcmp ("PKGV0009", pointer) != 0 && + strcmp ("PKGV0010", pointer) != 0 && + strcmp ("PKGV0012", pointer) != 0 && strcmp ("PKGV0013", pointer) != 0 && strcmp ("PKGV0014", pointer) != 0 && - strcmp ("PKGV0015", pointer) != 0) + strcmp ("PKGV0015", pointer) != 0 && + strcmp ("PKGV0016", pointer) != 0) { + std::stringstream msg; + msg << "Unsupported package version: " << pointer; delete[] pointer; - throw std::runtime_error ("Unsupported package version"); + throw std::runtime_error (msg.str ()); } // free memory diff --git a/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp b/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp index f5a9c53..235b6da 100644 --- a/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp +++ b/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp @@ -328,11 +328,12 @@ GLuint CPass::compileShader (Render::Shaders::Compiler* shader, GLuint type) // get information about the error glGetShaderInfoLog (shaderID, infoLogLength, nullptr, logBuffer); // throw an exception about the issue - std::string message = logBuffer; + std::stringstream buffer; + buffer << logBuffer << std::endl << "Compiled source code:" << std::endl << shader->getCompiled (); // free the buffer delete[] logBuffer; // throw an exception - throw std::runtime_error (message); + throw std::runtime_error (buffer.str()); } return shaderID;