From 3b06f5715071dbf434496a813747a1b099cd0ffe Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 2 May 2020 21:11:47 +0200 Subject: [PATCH] add missing inclde + --- code/AssetLib/Assjson/json_exporter.cpp | 3 ++- include/assimp/Exceptional.h | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/Assjson/json_exporter.cpp b/code/AssetLib/Assjson/json_exporter.cpp index 903d59acb..b9099d392 100644 --- a/code/AssetLib/Assjson/json_exporter.cpp +++ b/code/AssetLib/Assjson/json_exporter.cpp @@ -14,6 +14,7 @@ Licensed under a 3-clause BSD license. See the LICENSE file for more information #include #include #include +#include #include #include @@ -767,7 +768,7 @@ void Write(JSONWriter &out, const aiScene &ai) { void ExportAssimp2Json(const char *file, Assimp::IOSystem *io, const aiScene *scene, const Assimp::ExportProperties *) { std::unique_ptr str(io->Open(file, "wt")); if (!str) { - throw Assimp::DeadlyExportError("could not open output file"); + throw DeadlyExportError("could not open output file"); } // get a copy of the scene so we can modify it diff --git a/include/assimp/Exceptional.h b/include/assimp/Exceptional.h index dcd5e2b2e..8970ade7c 100644 --- a/include/assimp/Exceptional.h +++ b/include/assimp/Exceptional.h @@ -66,10 +66,16 @@ public: : runtime_error(errorText) { // empty } - }; -typedef DeadlyImportError DeadlyExportError; +class DeadlyExportError : public runtime_error { +public: + /** Constructor with arguments */ + explicit DeadlyExportError(const std::string &errorText) : + runtime_error(errorText) { + // empty + } +}; #ifdef _MSC_VER # pragma warning(default : 4275)