aboutsummaryrefslogtreecommitdiff
path: root/base32
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-01-09 11:16:03 -0800
committerDaniel Mueller <deso@posteo.net>2019-01-09 11:16:03 -0800
commit3a99e7417e4c4eb30df9e711077c89b75764c029 (patch)
treebd56330e4809a9a1a7ed677c26a1b4805b31d30d /base32
parent6e0efd98e9ee07a01241e2187b4c820770c3c478 (diff)
downloadnitrocli-3a99e7417e4c4eb30df9e711077c89b75764c029.tar.gz
nitrocli-3a99e7417e4c4eb30df9e711077c89b75764c029.tar.bz2
Report command errors properly
So far we have taken all nitrokey::CommandError objects and put them in formatted form into the Error::Error variant. What we really should do, though, is to preserve the original error, with the additional context provided by the caller, and report that up the stack directly. Doing so has at least the benefit that we are able to check for expected errors without hard coding the textual representation as maintained by the nitrokey create. This change refactors the code accordingly and adds two tests for such expected error codes.
Diffstat (limited to 'base32')
0 files changed, 0 insertions, 0 deletions