lucet
lucet copied to clipboard
Reduce the reliance on strings in error types
We have, for example, the variant lucet_runtime::Error::LimitsExceeded(String)
. If a user of the runtime wants to know which limit they've exceeded, they have to look for keywords in the string. In this example, we should be able to enumerate which limits were exceeded, and possibly bundle that along with the Limits
struct itself.
There are a few other variants worth considering, like InvalidArgument
, NoLinearMemory
, and UnsupportedFeature
.