diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-03-01 14:37:51 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-03-15 11:53:14 +0100 |
commit | dd257663217d6d2c098d5a57d8a3f8c5a830310f (patch) | |
tree | b96aa0b14879ab1ea87a3b140edd37a144f2fe40 /ffi/include/sequoia/core.h | |
parent | f3da2cfee5469c7db87211c45a535f47456d9425 (diff) |
ffi: Improve error reporting.
- Add a status code representing errors.
- Hand out errors as opaque objects. These objects can then be
queried for the numeric status code, and a string representation.
Diffstat (limited to 'ffi/include/sequoia/core.h')
-rw-r--r-- | ffi/include/sequoia/core.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ffi/include/sequoia/core.h b/ffi/include/sequoia/core.h index fb775926..da6732aa 100644 --- a/ffi/include/sequoia/core.h +++ b/ffi/include/sequoia/core.h @@ -21,11 +21,11 @@ typedef struct sq_context *sq_context_t; /*/ -/// Returns the last error message. +/// Returns the last error. /// -/// The returned value must be freed with `sq_string_free`. +/// Returns and removes the last error from the context. /*/ -char *sq_last_strerror (const sq_context_t ctx); +sq_error_t sq_context_last_error (sq_context_t ctx); /*/ /// Frees a string returned from Sequoia. |