From b78d47f1efb3d0662fce1b8d45a9eb11b3caef02 Mon Sep 17 00:00:00 2001
From: Lizerui9926 <110582652+Lizerui9926@users.noreply.github.com>
Date: 星期三, 26 四月 2023 17:17:52 +0800
Subject: [PATCH] Merge pull request #427 from alibaba-damo-academy/dev_gflags

---
 funasr/runtime/onnxruntime/src/vocab.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/vocab.cpp b/funasr/runtime/onnxruntime/src/vocab.cpp
index ba041b8..53233b3 100644
--- a/funasr/runtime/onnxruntime/src/vocab.cpp
+++ b/funasr/runtime/onnxruntime/src/vocab.cpp
@@ -1,5 +1,6 @@
 #include "vocab.h"
-#include "yaml-cpp/yaml.h"
+#include <yaml-cpp/yaml.h>
+#include <glog/logging.h>
 
 #include <fstream>
 #include <iostream>
@@ -22,8 +23,8 @@
     YAML::Node config;
     try{
         config = YAML::LoadFile(filename);
-    }catch(...){
-        printf("error loading file, yaml file error or not exist.\n");
+    }catch(exception const &e){
+        LOG(INFO) << "Error loading file, yaml file error or not exist.";
         exit(-1);
     }
     YAML::Node myList = config["token_list"];

--
Gitblit v1.9.1