Closed DenisCarriere closed 4 years ago
It's better to use check if you strictly require a custom error message, otherwise is_account by itself will also throw an error that's more generic (the basic behavior we need). Thank you so much for highlighting this though, we should probably use the check approach.
@ricktobacco I've just tested this locally for myself and is_account()
only returns a boolean (true/false)
It doesn't throw any error
Try adding is_account("foo"_n);
anywhere in your code and you'll see it won't throw an error
I'm using the latest CDT compiler, maybe things have changed from 1.4 or 1.5 => 1.6
$ eosio-cpp --version
eosio-cpp version 1.6.2
foo
account does not exist, an error should of been raised by calling this action
Ah interesting, in that case great catch, will update now and thanks again :) !
@ricktobacco are these changes in for all is_account
checks?
@yudilevi Yes
@ricktobacco awesome, thanks :)
Noticed a few of
is_account
that are "dangling" (check
not being enforced)https://github.com/bancorprotocol/contracts_eos/blob/0cb1bd049af6dbd2ae2d8fd6f45a3969ca6947d4/contracts/eos/MultiConverter/MultiConverter.cpp#L87
https://github.com/bancorprotocol/contracts_eos/blob/0cb1bd049af6dbd2ae2d8fd6f45a3969ca6947d4/contracts/eos/MultiConverter/MultiConverter.cpp#L73
Before
After