From 7483e47c913664c708017aab196a23f7a247efdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Tue, 22 Sep 2020 13:46:40 +0800 Subject: [PATCH] enhanced the error messages, test=develop (#4369) --- lite/model_parser/model_parser.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lite/model_parser/model_parser.cc b/lite/model_parser/model_parser.cc index e96ddce7c0..13e5b44438 100644 --- a/lite/model_parser/model_parser.cc +++ b/lite/model_parser/model_parser.cc @@ -1000,14 +1000,17 @@ void LoadModelNaiveFromMemory(const std::string &model_buffer, #ifndef LITE_ON_TINY_PUBLISH LoadModelNaiveV0FromMemory(model_buffer, scope, cpp_prog); #else - LOG(FATAL) << "Error: Unsupported model type."; + LOG(FATAL) << "Paddle-Lite v2.7 has upgraded the naive-buffer model " + "format. Please use the OPT to generate a new model. " + "Thanks!"; #endif break; case 1: LoadModelNaiveV1FromMemory(model_buffer, scope, cpp_prog); break; default: - LOG(FATAL) << "Error: Unsupported model type."; + LOG(FATAL) << "The model format cannot be recognized. Please make sure " + "you use the correct interface and model file."; break; } } -- GitLab