summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-09-06 19:15:57 +0900
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2019-09-06 19:15:57 +0900
commit1976f60c890d82000a6a1de0a75ceac217348f3b (patch)
treeea9bcb33a7b5a36398a0e3d10f6181e46c9d095f /tests
parent5559cf629060ed800cfdf5b7a1830223eaf26040 (diff)
downloadnnfw-1976f60c890d82000a6a1de0a75ceac217348f3b.tar.gz
nnfw-1976f60c890d82000a6a1de0a75ceac217348f3b.tar.bz2
nnfw-1976f60c890d82000a6a1de0a75ceac217348f3b.zip
Check OOR exception intflite_benchmark (#7260)
Add try-catch to catch OOR exception by substr Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'tests')
-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;
}