mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 11:59:03 +08:00
gcc and clang did not like throwing std::exceptions with a cstring arugment
This commit is contained in:
parent
2ac981e422
commit
b8369ab19a
@ -318,7 +318,7 @@ void ConfigBase::load_from_gcode(const std::string &file)
|
|||||||
std::string firstline;
|
std::string firstline;
|
||||||
std::getline(ifs, firstline);
|
std::getline(ifs, firstline);
|
||||||
if (strncmp(slic3r_gcode_header, firstline.c_str(), strlen(slic3r_gcode_header)) != 0)
|
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);
|
ifs.seekg(0, ifs.end);
|
||||||
auto file_length = ifs.tellg();
|
auto file_length = ifs.tellg();
|
||||||
@ -379,7 +379,7 @@ void ConfigBase::load_from_gcode(const std::string &file)
|
|||||||
if (num_key_value_pairs < 90) {
|
if (num_key_value_pairs < 90) {
|
||||||
char msg[80];
|
char msg[80];
|
||||||
sprintf(msg, "Suspiciously low number of configuration values extracted: %d", num_key_value_pairs);
|
sprintf(msg, "Suspiciously low number of configuration values extracted: %d", num_key_value_pairs);
|
||||||
throw std::exception(msg);
|
throw std::runtime_error(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user