I have managed to port my project mostly to rust 2018. However, there is one final problem.
I was using error_chain which is deprecated,
I can’t import the error_chain macro anymore using the new way to import macros.
I thought about moving to the failure create but that also looks abandoned as it hasn’t had a commit in the last few months.
What would people recommend ?
I have around twenty errors defined with the error_chain macro and use bail! a lot throughout mu code
I also pass around ten errors from dependencies.
Is there a recommended way to handle errors that I have missed ?
It looks like there is a workaround for
error_chain here: https://github.com/rust-lang-nursery/error-chain/issues/250#issuecomment-418063585
// Import the actual error_chain macro...
// ...and also import all the macros it uses internally
There’s currently a pull request open on the
error_chain repository to fix this, so that you can just do
Also, there’s a good thread here where people discussed what the most ‘current’ way of doing error handling is.