From c20343e970d961e9cdb262a65d08c36d76b169d6 Mon Sep 17 00:00:00 2001 From: Weilei Zeng at qlab01 Date: Thu, 21 Sep 2023 18:48:46 +0800 Subject: [PATCH] add flag for verified codes --- verification.cpp | 82 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 14 deletions(-) diff --git a/verification.cpp b/verification.cpp index 3920f60..d08568e 100644 --- a/verification.cpp +++ b/verification.cpp @@ -25,21 +25,64 @@ bool verify(std::string code_prefix){ bool verify(std::string code_prefix, double & rho_x, double & rho_z, int & n_Gx, int & n_Gz){ std::ifstream jsonfile(code_prefix+".json"); - json data = json::parse(jsonfile); + // json data = json::parse(jsonfile); + + json data; + try{ + data = json::parse(jsonfile); + } catch (std::exception& e){ + std::cout<