From c5b29d985b92e3138e0e165b65aad45171480a86 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 11 Feb 2017 16:45:22 -0500 Subject: [PATCH] Added try/catch block to main --- examples/dnn_face_recognition_ex.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/dnn_face_recognition_ex.cpp b/examples/dnn_face_recognition_ex.cpp index c9d3f9676..dbafe885c 100644 --- a/examples/dnn_face_recognition_ex.cpp +++ b/examples/dnn_face_recognition_ex.cpp @@ -78,7 +78,7 @@ std::vector> jitter_image( // ---------------------------------------------------------------------------------------- -int main(int argc, char** argv) +int main(int argc, char** argv) try { if (argc != 2) { @@ -194,6 +194,10 @@ int main(int argc, char** argv) cout << "hit enter to terminate" << endl; cin.get(); } +catch (std::exception& e) +{ + cout << e.what() << endl; +} // ----------------------------------------------------------------------------------------