mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH: merge all error when multi obj have empty layer
Change-Id: Iff091babff67050fe512a3cffe6cb2af0e91efa5 STUDIO-2540 (cherry picked from commit e23781245e3a6ae9bffcff869aa8991eb0298243) Change-Id: Ia90ffa1244ef8a89c8d3007ca65b68439b09249b
This commit is contained in:
parent
81319b6a9e
commit
35d6b072d3
8 changed files with 73 additions and 26 deletions
|
@ -46,9 +46,10 @@ bool SlicingProcessCompletedEvent::critical_error() const
|
|||
} catch (const Slic3r::SlicingError &) {
|
||||
// Exception derived from SlicingError is non-critical.
|
||||
return false;
|
||||
} catch (...) {
|
||||
}
|
||||
return true;
|
||||
} catch (const Slic3r::SlicingErrors &) {
|
||||
return false;
|
||||
} catch (...) {}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SlicingProcessCompletedEvent::invalidate_plater() const
|
||||
|
@ -69,7 +70,7 @@ bool SlicingProcessCompletedEvent::invalidate_plater() const
|
|||
return false;
|
||||
}
|
||||
|
||||
std::pair<std::string, size_t> SlicingProcessCompletedEvent::format_error_message() const
|
||||
std::pair<std::string, std::vector<size_t>> SlicingProcessCompletedEvent::format_error_message() const
|
||||
{
|
||||
std::string error;
|
||||
size_t monospace = 0;
|
||||
|
@ -88,12 +89,20 @@ std::pair<std::string, size_t> SlicingProcessCompletedEvent::format_error_messag
|
|||
} catch (SlicingError &ex) {
|
||||
error = ex.what();
|
||||
monospace = ex.objectId();
|
||||
} catch (SlicingErrors &exs) {
|
||||
std::vector<size_t> ids;
|
||||
for (auto &ex : exs.errors_) {
|
||||
error = ex.what();
|
||||
monospace = ex.objectId();
|
||||
ids.push_back(monospace);
|
||||
}
|
||||
return std::make_pair(std::move(error), ids);
|
||||
} catch (std::exception &ex) {
|
||||
error = ex.what();
|
||||
} catch (...) {
|
||||
error = "Unknown C++ exception.";
|
||||
}
|
||||
return std::make_pair(std::move(error), monospace);
|
||||
error = ex.what();
|
||||
} catch (...) {
|
||||
error = "Unknown C++ exception.";
|
||||
}
|
||||
return std::make_pair(std::move(error), std::vector<size_t>{monospace});
|
||||
}
|
||||
|
||||
BackgroundSlicingProcess::BackgroundSlicingProcess()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue