diff options
author | bubnikv <bubnikv@gmail.com> | 2017-06-14 21:33:20 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-06-14 21:33:20 +0300 |
commit | b8369ab19a0e4db9f5d609154a870b670a811e8f (patch) | |
tree | 2aa855f9828690a7fd405923d0d9a3eb5c08ad0f /xs/src/libslic3r/Config.cpp | |
parent | 2ac981e4220719956202c53708855e51640dda04 (diff) |
gcc and clang did not like throwing std::exceptions with a cstring arugment
Diffstat (limited to 'xs/src/libslic3r/Config.cpp')
-rw-r--r-- | xs/src/libslic3r/Config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index 4c3101533..0baf14be9 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -318,7 +318,7 @@ void ConfigBase::load_from_gcode(const std::string &file) std::string firstline; std::getline(ifs, firstline); if (strncmp(slic3r_gcode_header, firstline.c_str(), strlen(slic3r_gcode_header)) != 0) - throw std::exception("Not a Slic3r generated g-code."); + throw std::runtime_error("Not a Slic3r generated g-code."); } ifs.seekg(0, ifs.end); auto file_length = ifs.tellg(); @@ -379,7 +379,7 @@ void ConfigBase::load_from_gcode(const std::string &file) if (num_key_value_pairs < 90) { char msg[80]; sprintf(msg, "Suspiciously low number of configuration values extracted: %d", num_key_value_pairs); - throw std::exception(msg); + throw std::runtime_error(msg); } } |