return JSON error to see what went wrong

This commit is contained in:
Joeri Exelmans 2025-11-05 09:34:42 +01:00
parent 3efb84e0e7
commit 3cfe92cea9
3 changed files with 71 additions and 64 deletions

View file

@ -52,7 +52,7 @@ pub fn eval_boolean(s: &str, js_trace: JsValue) -> JsValue {
// convert input (a sequence of state-objects) to a Trace that argus accepts:
let trace: StateBuddyTrace = match from_value(js_trace) {
Ok(trace) => trace,
Err(e) => return JsValue::from_str("failed to parse JSON"),
Err(e) => return JsValue::from_str(("failed to parse JSON: ".to_owned() + &e.to_string()).as_str()),
};
let mut traceMap = HashMap::<&str, Signal<f64>>::new();
for entry in &trace.entries {