feat: better error handling #17
Reference in New Issue
Block a user
Delete Branch "feat/errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@cblgh no rush on this. I have gone back and forth on this and I think it's ready for another pair of eyeballs. What do you think of the error checking API in
examples/errors/errors.go?Internals nerd zone
Sadly, iroh will not give us the `IrohError` directly from the API. That is what we want because it gives us the detailed error message in `IrohError.Message()`. So, we need to kind of wrap up some sort of convenient conversion and also preserve the `err != nil` checks that you usually expect. It's too verbose to have to do this every time we receive an `error` on the API consumer side. That's the `iroh.As` API. `errors.Is` is supported in general now.Refs:
18c424ee54to412c2f48eaView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.