From 813a73e614667555d8644046c33e4865f283142a Mon Sep 17 00:00:00 2001
From: Enrico Turri <enricoturri@seznam.cz>
Date: Mon, 2 Sep 2019 09:38:45 +0200
Subject: [PATCH] Attempt to fix non compatible (newer) .3mf and .amf import
 error handling on Linux and OsX

---
 src/libslic3r/Format/3mf.cpp | 2 +-
 src/libslic3r/Format/AMF.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp
index 2a8b4d1d3..d4f72ffb3 100644
--- a/src/libslic3r/Format/3mf.cpp
+++ b/src/libslic3r/Format/3mf.cpp
@@ -567,7 +567,7 @@ namespace Slic3r {
                     {
                         // ensure the zip archive is closed and rethrow the exception
                         close_zip_reader(&archive);
-                        throw e;
+                        throw std::runtime_error(e.what());
                     }
                 }
             }
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index 7850c17fd..f43724cb6 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -872,7 +872,7 @@ bool load_amf_archive(const char* path, DynamicPrintConfig* config, Model* model
                 {
                     // ensure the zip archive is closed and rethrow the exception
                     close_zip_reader(&archive);
-                    throw e;
+                    throw std::runtime_error(e.what());
                 }
 
                 break;