From 5b1055524df8dc13ea95e620e6a181bb094dc0ac Mon Sep 17 00:00:00 2001 From: "a.nvlkv" Date: Thu, 16 Nov 2023 13:54:36 +0700 Subject: [PATCH] full error message --- crux_core/src/typegen.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crux_core/src/typegen.rs b/crux_core/src/typegen.rs index 55a187735..237a9c94d 100644 --- a/crux_core/src/typegen.rs +++ b/crux_core/src/typegen.rs @@ -213,9 +213,9 @@ impl TypeGen { State::Registering(tracer, _) => match tracer.trace_simple_type::() { Ok(_) => Ok(()), Err(e @ serde_reflection::Error::DeserializationError(_)) => { - Err(TypeGenError::Deserialization(e.explanation())) + Err(TypeGenError::Deserialization(format!("{}: {}",e.to_string(), e.explanation()))) } - Err(e) => Err(TypeGenError::TypeTracing(e.explanation())), + Err(e) => Err(TypeGenError::TypeTracing(format!("{}: {}",e.to_string(), e.explanation()))), }, _ => Err(TypeGenError::LateRegistration), } @@ -258,18 +258,18 @@ impl TypeGen { match tracer.trace_value::(samples, sample) { Ok(_) => {} Err(e @ serde_reflection::Error::DeserializationError(_)) => { - return Err(TypeGenError::ValueTracing(e.explanation())) + return Err(TypeGenError::ValueTracing(format!("{}: {}",e.to_string(), e.explanation()))) } - Err(e) => return Err(TypeGenError::ValueTracing(e.explanation())), + Err(e) => return Err(TypeGenError::ValueTracing(format!("{}: {}",e.to_string(), e.explanation()))), } } match tracer.trace_type::(samples) { Ok(_) => Ok(()), Err(e @ serde_reflection::Error::DeserializationError(_)) => { - Err(TypeGenError::Deserialization(e.explanation())) + Err(TypeGenError::Deserialization(format!("{}: {}",e.to_string(), e.explanation()))) } - Err(e) => Err(TypeGenError::TypeTracing(e.explanation())), + Err(e) => Err(TypeGenError::TypeTracing(format!("{}: {}",e.to_string(), e.explanation()))), } } _ => Err(TypeGenError::LateRegistration),