diff --git a/src/NZSL/Archive.cpp b/src/NZSL/Archive.cpp index d823918..5d2ae28 100644 --- a/src/NZSL/Archive.cpp +++ b/src/NZSL/Archive.cpp @@ -122,7 +122,7 @@ namespace nzsl std::uint32_t version; deserializer.Deserialize(version); if (version > s_shaderArchiveCurrentVersion) - throw std::runtime_error("unsupported version"); + throw std::runtime_error(fmt::format("unsupported archive version {0} (max supported version: {1})", version, s_shaderArchiveCurrentVersion)); std::uint32_t moduleCount; deserializer.Deserialize(moduleCount); diff --git a/src/NZSL/Ast/AstSerializer.cpp b/src/NZSL/Ast/AstSerializer.cpp index 22e11fc..08eed86 100644 --- a/src/NZSL/Ast/AstSerializer.cpp +++ b/src/NZSL/Ast/AstSerializer.cpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace nzsl::Ast { @@ -861,7 +862,7 @@ namespace nzsl::Ast m_deserializer.Deserialize(m_version); if (m_version > s_shaderAstCurrentVersion) - throw std::runtime_error("unsupported version"); + throw std::runtime_error(fmt::format("unsupported module version {0} (max supported version: {1})", m_version, s_shaderAstCurrentVersion)); ModulePtr module = std::make_shared(); SerializeModule(*module);