Skip to content

Commit

Permalink
refactor(error): improve error handling
Browse files Browse the repository at this point in the history
Addresses issue kindelia#247.  (more to come later)

kindelia_core:

* removes all unwrap() from net.rs
* defines error enums in net.rs: ProtoCommError and ParseAddressError
* return Result from affected fn in net.rs
* change IPV6 panic!() to unimplemented!()
* accept addr arg for Node::new() so it can avoid returning Result
* update test and bench as necessary

kindelia:

* add dep on anyhow crate
* return anyhow::Result from config methods
* return anyhow::Result from main methods, including main()
* return anyhow::Result from FileInput::read_to_string()
  • Loading branch information
dan-da committed Nov 28, 2022
1 parent cec54cb commit 7eda7cb
Show file tree
Hide file tree
Showing 9 changed files with 280 additions and 135 deletions.
70 changes: 70 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kindelia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ serde_json = "1.0"

# Events API
tokio = { version = "1.19.1", features = ["sync"] }

anyhow = { version = "1.0.66", features = ["backtrace"] }

[dev-dependencies]
assert_cmd = "1.0.1"
Expand Down
Loading

0 comments on commit 7eda7cb

Please sign in to comment.