add missing inclde +

pull/3197/head
Kim Kulling 2020-05-02 21:11:47 +02:00
parent 4f902faddf
commit 3b06f57150
2 changed files with 10 additions and 3 deletions

View File

@ -14,6 +14,7 @@ Licensed under a 3-clause BSD license. See the LICENSE file for more information
#include <assimp/IOStream.hpp> #include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp> #include <assimp/IOSystem.hpp>
#include <assimp/Importer.hpp> #include <assimp/Importer.hpp>
#include <assimp/Exceptional.h>
#include <cassert> #include <cassert>
#include <limits> #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 *) { void ExportAssimp2Json(const char *file, Assimp::IOSystem *io, const aiScene *scene, const Assimp::ExportProperties *) {
std::unique_ptr<Assimp::IOStream> str(io->Open(file, "wt")); std::unique_ptr<Assimp::IOStream> str(io->Open(file, "wt"));
if (!str) { 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 // get a copy of the scene so we can modify it

View File

@ -66,10 +66,16 @@ public:
: runtime_error(errorText) { : runtime_error(errorText) {
// empty // 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 #ifdef _MSC_VER
# pragma warning(default : 4275) # pragma warning(default : 4275)