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
I have noticed multiple times that runtime error messages produced by inkjs differ in slight but significant ways by those outputting by Inky. In particular, when one attempts to perform a logical operation like > on a variable which is not a number, the error message one should get looks approximately like this:
Cannot perform operation > on String
However, in inkjs, this looks like so:
Cannot perform operation > on 3
After a colleague pointed out this was likely referring to a type, not a value, we found that error messages from NativeFunctionCall.ts were including the value from the enum, which is an integer, rather than the key, which is a string.
Reproduction
Produce a runtime error by comparing two variables which are of an incomparable type.
Note the error produced in inkjs differs from that produced by Inky.
Overview
I have noticed multiple times that runtime error messages produced by inkjs differ in slight but significant ways by those outputting by Inky. In particular, when one attempts to perform a logical operation like
>
on a variable which is not a number, the error message one should get looks approximately like this:Cannot perform operation > on String
However, in inkjs, this looks like so:
Cannot perform operation > on 3
After a colleague pointed out this was likely referring to a type, not a value, we found that error messages from
NativeFunctionCall.ts
were including the value from the enum, which is an integer, rather than the key, which is a string.Reproduction
Pull request
#479
The text was updated successfully, but these errors were encountered: