From 075a433ae8e67d0f2bfa565f6675859f932f2162 Mon Sep 17 00:00:00 2001 From: Ethan Celletti Date: Tue, 30 Apr 2024 08:23:58 -0700 Subject: [PATCH] Fixing exception message in CandidPrimitive.cs (#128) --- src/Candid/Models/Values/CandidPrimitive.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Candid/Models/Values/CandidPrimitive.cs b/src/Candid/Models/Values/CandidPrimitive.cs index 9df10d43..73c567ba 100644 --- a/src/Candid/Models/Values/CandidPrimitive.cs +++ b/src/Candid/Models/Values/CandidPrimitive.cs @@ -406,11 +406,11 @@ private void EncodeBigInteger(BigInteger value, IBufferWriter destination, { if (this.ValueType != type) { - if(isNullable && this.ValueType == PrimitiveType.Null) + if (isNullable && this.ValueType == PrimitiveType.Null) { return default; } - throw new InvalidOperationException($"Cannot convert candid type '{this.Type}' to candid type '{type}'"); + throw new InvalidOperationException($"Cannot convert candid primitive type '{this.ValueType}' to candid type '{type}'"); } return (T)this.value!; }