an-cabal/an-rope

More robust error handling in Rope

Opened this issue · 2 comments

hawkw commented

Right now, a lot of our Rope code is littered with panic!()s and .expect()s. This is fine for a first iteration, but we need to move toward more robust error handling. At the very least, we should replace as many panics as possible with Results.

hawkw commented

We might want to look into using the brson/error-chain crate. I have no experience using this, but I hear it's good.

See also: http://brson.github.io/2016/11/30/starting-with-error-chain

hawkw commented

Some questions:

  • what do libraries need to do to to support error-chain? is it only for executables?
  • can we support error-chain as an optional dependency in a library?