diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-01-16 17:02:11 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-01-16 17:02:11 +0100 |
commit | 4477f74b07070bdd95a228cd4b97dd5f9fb70aaf (patch) | |
tree | 5c66d334e6aea11e0a092a3c552da9376cb0fcda /ffi/src/core.rs | |
parent | 99ad668da45db0d74b74d1e4888f1c286130c6a4 (diff) |
ffi: Introduce setter for the error in the Context.
Diffstat (limited to 'ffi/src/core.rs')
-rw-r--r-- | ffi/src/core.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ffi/src/core.rs b/ffi/src/core.rs index de44a8bd..05cd1279 100644 --- a/ffi/src/core.rs +++ b/ffi/src/core.rs @@ -56,13 +56,17 @@ use sequoia_core::Config; #[doc(hidden)] pub struct Context { pub(crate) c: core::Context, - pub(crate) e: Option<failure::Error>, + e: Option<failure::Error>, } impl Context { fn new(c: core::Context) -> Self { Context{c: c, e: None} } + + pub(crate) fn set_error(&mut self, e: failure::Error) { + self.e = Some(e); + } } /// Returns the last error. |