Skip to content

Commit 5ff79cd

Browse files
JanCahawonder-sk
authored andcommitted
catch pipeline execution error
1 parent ed664d3 commit 5ff79cd

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/utils.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,29 @@ void runPipelineParallel(point_count_t totalPoints, bool isStreaming, std::vecto
122122
p.add([pipeline]() {
123123

124124
MyTable table(CHUNK_SIZE);
125-
pipeline->executeStream(table);
126-
125+
try
126+
{
127+
pipeline->executeStream(table);
128+
}
129+
catch ( pdal::pdal_error& e )
130+
{
131+
std::cerr << "Error in wrench execution: " << e.what() << std::endl;
132+
std::exit(EXIT_FAILURE);
133+
}
127134
});
128135
}
129136
else
130137
{
131138
p.add([pipeline, &pipelines, i]() {
132-
pipeline->execute();
139+
try
140+
{
141+
pipeline->execute();
142+
}
143+
catch ( pdal::pdal_error& e )
144+
{
145+
std::cerr << "Error in wrench execution: " << e.what() << std::endl;
146+
std::exit(EXIT_FAILURE);
147+
}
133148
pipelines[i].reset(); // to free the point table and views (meshes, rasters)
134149
sProgressBar.add();
135150
});

0 commit comments

Comments
 (0)