Replaced some of Slic3r::RuntimeError exceptions with Slic3r::SlicingError.

Only Slic3r::SlicingError are now displayed by a notification, other
exceptions are shown by a pop-up dialog.
This commit is contained in:
Vojtech Bubnik 2020-09-14 18:01:25 +02:00
parent 067cde85f1
commit 1eadb6a1a9
5 changed files with 16 additions and 10 deletions

View file

@ -139,7 +139,7 @@ void PrintObject::slice()
}
});
if (m_layers.empty())
throw Slic3r::RuntimeError("No layers were detected. You might want to repair your STL file(s) or check their size or thickness and retry.\n");
throw Slic3r::SlicingError("No layers were detected. You might want to repair your STL file(s) or check their size or thickness and retry.\n");
this->set_done(posSlice);
}
@ -427,7 +427,7 @@ void PrintObject::generate_support_material()
// therefore they cannot be printed without supports.
for (const Layer *layer : m_layers)
if (layer->empty())
throw Slic3r::RuntimeError("Levitating objects cannot be printed without supports.");
throw Slic3r::SlicingError("Levitating objects cannot be printed without supports.");
#endif
}
this->set_done(posSupportMaterial);