>It only works when your function returns error of the same type as expression inside 'try!' or '?' macros. So in a lot of cases it doesn't work or forces programmer to return underlying type of error
Or you can implement a conversion from the underlying error to your custom error type[1], and 'try'/'?' will just work.
[1]https://doc.rust-lang.org/book/error-handling.html#composing...