Previously, if AFD failed to initialize polling would return a custom
I/O error with a string error, containing the formatted version of the
underlying system error. However, this means that information about the
underlying system error is lost to the user.
This commit makes it so the returned io::Error wraps a user
inaccessible type: AfdError. This AfdError, when stringified,
returns a similar error message as what was previously returned. In
addition when .source() is used it returns the underlying system
error.
Previously, if AFD failed to initialize
polling
would return a custom I/O error with a string error, containing the formatted version of the underlying system error. However, this means that information about the underlying system error is lost to the user.This commit makes it so the returned
io::Error
wraps a user inaccessible type:AfdError
. ThisAfdError
, when stringified, returns a similar error message as what was previously returned. In addition when.source()
is used it returns the underlying system error.Closes #174