Cryptlex Forums

LexActivator increment Meter attribute does not throw exception when expected

J
Jesse

Hi o/

Incrementing meter attributes that exist for the license works fine.
But when I try to increment a meter attribute that does not exist in the license, LexActivator.IncrementActivationMeterAttributeUses() does not throw a LexActivatorException.

Is it expected behaviour for LexActivatorNative.IncrementActivationMeterAttributeUses to return LA_OK when the Meter attribute does not exist for the license?

I wouldn’t like to add a call to get the meter attribute to check if it exists.

(Using Cryptlex.LexActivator 3.19.1 in dotnet)

A
Adnan KamiliCryptlex team

Hi Jesse,

Any possibility that meter attribute existed before but you removed it later?

J
Jesse

Hi Adnan,

I have just tested a random string to increment with, that I’m positive hasn’t existed as a meter attribute before on any license. It still does not throw a LexActivatorException, or any exception.

Thanks for responding :slight_smile:

A
Adnan KamiliCryptlex team

What is the license type? Are you passing LA_IN_MEMORY in SetProductId() function?

A
Adnan KamiliCryptlex team

Yes, the increment is simply ignored if the meter attribute doesn’t exist. I agree not so intuitive. We will see into to update this behaviour in future.

← Back to all topics · 5 posts · 757 views · opened 2022-09-07