Browse Source

add missing inclde +

Kim Kulling 5 years ago
parent
commit
3b06f57150
2 changed files with 10 additions and 3 deletions
  1. 2 1
      code/AssetLib/Assjson/json_exporter.cpp
  2. 8 2
      include/assimp/Exceptional.h

+ 2 - 1
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 <assimp/IOStream.hpp>
 #include <assimp/IOSystem.hpp>
 #include <assimp/Importer.hpp>
+#include <assimp/Exceptional.h>
 
 #include <cassert>
 #include <limits>
@@ -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<Assimp::IOStream> 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

+ 8 - 2
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)