nervosnetwork/ckb-std

exec_cell should return Result<!, SysError>

blckngm opened this issue · 1 comments

If it succeeds, it won't return.

(But ! is usable in stable yet, if we don't want to use the nightly feature, we can use Infallible instead.)

Always returning OK is very problematic.

Someone writing a lock/type script will certainly expect that

exec_cell(...)?

propagates the error if exec fails.

It's highly likely to forget to check the error in Ok.