From 6ccd0aa2fb20b838444cbf974f72633665df8774 Mon Sep 17 00:00:00 2001 From: Kasey White Date: Mon, 19 Sep 2022 14:59:49 -0400 Subject: [PATCH] adding better debug for wrong term tag in uplc --- crates/uplc/src/flat.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/uplc/src/flat.rs b/crates/uplc/src/flat.rs index dd2f800b..dd766547 100644 --- a/crates/uplc/src/flat.rs +++ b/crates/uplc/src/flat.rs @@ -190,8 +190,10 @@ where 6 => Ok(Term::Error), 7 => Ok(Term::Builtin(DefaultFunction::decode(d)?)), x => Err(de::Error::Message(format!( - "Unknown term constructor tag: {}", - x + "Unknown term constructor tag: {} and buffer position is {} and buffer length is {}", + x, + d.buffer.len() - d.pos, + d.buffer.len() ))), } }