From a442d58997d076436acd39efadc84a0dc793de0b Mon Sep 17 00:00:00 2001 From: YuhangQ Date: Thu, 25 Nov 2021 10:35:55 +0800 Subject: [PATCH] fix error --- src/test/test.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/test.h b/src/test/test.h index 3753b86..af717a9 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -64,17 +64,16 @@ void terminal() { try { auto res = col->query(json); + printf("query result: \n"); + for(auto& j : res) { + printf(" - %s\n", j.dump().c_str()); + } } catch(const char *err) { printf("ERROR: %s\n", err); } catch(...) { printf("ERROR: query failed. check your input.\n"); continue; } - - printf("query result: \n"); - for(auto& j : res) { - printf(" - %s\n", j.dump().c_str()); - } } } }