Description
@agoric/base-zone has an implementation of isPassable
that emulates the proper behavior using a try/catch to turn the thrown failure of passStyleOf
into a return false;
.
As of #2042 , that is duplicated into @endo/pass-style , as a first step of migrating isPassable
from @agoric/base-zone into @endo/pass-style. Once synced, we should also delete the one in @agoric/base-zone and change its users to import from @endo/pass-style instead.
passStyleOf
should be rewritten into the form of our other checkFoo
functions to take a Checker
argument, so it can be used to create either an assertPassable
that throws or an isPassable
that never throws but rather returns false iff assertPassable
would have thrown. passStyleOf
would then be like assertPassable
except that the success case also returns a string.
This will require a significant refactoring of passStyleOf
, which is already performance critical, so we'll need to be careful.