From 2c76669c1ccc154202cddc6050a6138b044dc43b Mon Sep 17 00:00:00 2001 From: Adam Marcus Date: Tue, 29 Oct 2024 18:54:12 -0400 Subject: [PATCH] Debugging (will revert) --- src/bin/ayb_isolated_runner.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/ayb_isolated_runner.rs b/src/bin/ayb_isolated_runner.rs index d69117b..944023d 100644 --- a/src/bin/ayb_isolated_runner.rs +++ b/src/bin/ayb_isolated_runner.rs @@ -22,9 +22,15 @@ fn main() -> Result<(), serde_json::Error> { .expect("query mode should be 0 or 1"); let query = (args[3..]).to_vec(); let result = query_sqlite(&PathBuf::from(db_file), &query.join(" "), false, query_mode); + let query_mode2 = QueryMode::try_from( + args[2] + .parse::() + .expect("query mode should be an integer"), + ) + .expect("query mode should be 0 or 1"); match result { Ok(result) => println!("{}", serde_json::to_string(&result)?), - Err(error) => eprintln!("{}", serde_json::to_string(&error)?), + Err(error) => eprintln!("{}---{}---{:?}---{:?}", serde_json::to_string(&error)?, db_file, query_mode2, query), } Ok(()) }