Skip to content

Commit

Permalink
Fixing exception message in CandidPrimitive.cs (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekctek authored Apr 30, 2024
1 parent 749a3e2 commit 075a433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Candid/Models/Values/CandidPrimitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,11 @@ private void EncodeBigInteger(BigInteger value, IBufferWriter<byte> 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!;
}
Expand Down

0 comments on commit 075a433

Please sign in to comment.