You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubtypeDataProcessingError{InvalidSignature}pubfnprocess_data(important_data:Data)->Result(a,DataProcessingError){use<-assert_or_error(isValidSignature(important_data.signature),InvalidSignature)// do things with data}
This still allows us to make assumptions in our code, but allows us to propagate errors instead of killing the program outright.
The text was updated successfully, but these errors were encountered:
Implementation would probably be mostly two functions
assert_or_die
Use case
This is useful, especially for hacking things out quickly, but isn't very idiomatic, hence the need for our second implementation.
assert_or_error
Use case
This still allows us to make assumptions in our code, but allows us to propagate errors instead of killing the program outright.
The text was updated successfully, but these errors were encountered: