Replies: 1 comment 9 replies
-
Currently there's no way to catch a contract error, if that what's you're referring to. One possibility would be to use predicates instead - that is, have your actual contract code be I'm not sure we'll have some form of general try-catch mechanism for contracts. This has an important impact on the rest of the language. A middle ground would be that there is a better distinction of contracts that are just predicates - for example |
Beta Was this translation helpful? Give feedback.
-
Is there a way to make broken contract not fail immediately? e.g. I'm writing a contract that's in effect composed of 4 smaller contracts, and if two of them would fail on a value, I'd like nickel to apply all 4 contracts separately without failing but let me to collect the error info, and when I manually invoke
std.fail_with
I could let the user know which two contracts passed and which two contracts failed in the error message.Beta Was this translation helpful? Give feedback.
All reactions