You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code below, I used the wrong key field to retrieve a StorageMap value. This result in a bad cast attempt, trying to cast a BigInteger value to a UInt160 value. This produced a strange VM exception that doesn't indicate the actual error.
Here's the code:
private static UInt160 getOwner()
{
var ownerVal = (UInt160) ContractMetadata.Get(VARNAME_WRONG_KEY_FIELD_NAME);
// Convert null to UInt160.Zero.
if (ownerVal == null)
return UInt160.Zero;
return ownerVal;
}
VARNAME_WRONG_KEY_FIELD_NAME belongs to a BigInteger value in the storage map, not a UInt160.
Here's the error message:
Engine State Fault: An unhandled exception was thrown. (��� ZT� ����`��cs�?؏ [VMUnhandledException]
The text was updated successfully, but these errors were encountered:
In the code below, I used the wrong key field to retrieve a
StorageMap
value. This result in a bad cast attempt, trying to cast aBigInteger
value to aUInt160
value. This produced a strange VM exception that doesn't indicate the actual error.Here's the code:
VARNAME_WRONG_KEY_FIELD_NAME belongs to a
BigInteger
value in the storage map, not aUInt160
.Here's the error message:
The text was updated successfully, but these errors were encountered: