summaryrefslogtreecommitdiffstats
path: root/ffi/src/core.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ffi/src/core.rs')
-rw-r--r--ffi/src/core.rs6
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.