From c8fdf016660db18a0312f8a2ff8955bdd5015fc0 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 16 Mar 2023 19:13:08 +0000 Subject: [PATCH] Exception handling --- pctrain.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pctrain.cpp b/pctrain.cpp index 37705db..3c49c56 100644 --- a/pctrain.cpp +++ b/pctrain.cpp @@ -39,7 +39,7 @@ int main(int argc, char **argv){ exit(0); } -// try { + try { auto filenames = result["input"].as>(); std::string modelFilename = result["output"].as(); @@ -72,10 +72,10 @@ int main(int argc, char **argv){ // gbm::classify(evalPointSet, modelFilename, evalFeatures, labels, true, true); savePointSet(*evalPointSet, "evaluation_results.ply"); } -// } catch(std::exception &e){ -// std::cerr << "Error: " << e.what() << std::endl; -// exit(EXIT_FAILURE); -// } + } catch(std::exception &e){ + std::cerr << "Error: " << e.what() << std::endl; + exit(EXIT_FAILURE); + } return 0; }