summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tools/tflite_benchmark/src/tflite_benchmark.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/tools/tflite_benchmark/src/tflite_benchmark.cc b/tests/tools/tflite_benchmark/src/tflite_benchmark.cc
index 634b149e9..21eee4a18 100644
--- a/tests/tools/tflite_benchmark/src/tflite_benchmark.cc
+++ b/tests/tools/tflite_benchmark/src/tflite_benchmark.cc
@@ -52,11 +52,21 @@ void help(std::ostream &out, const int argc, char **argv)
bool checkParams(const int argc, char **argv)
{
- if (argc < 2)
+ try
{
- help(std::cerr, argc, argv);
+ if (argc < 2)
+ {
+ help(std::cerr, argc, argv);
+ return false;
+ }
+ }
+ catch (const std::exception &e)
+ {
+ std::cerr << e.what() << std::endl;
+
return false;
}
+
return true;
}