This will allow client code to provide more meaningful diagnostics. In
particular it will enable "notmuch new" to continue suggsting the user
run "notmuch setup" to create a config after "notmuch new" is
transitioned to the new configuration framework.
NOTMUCH_STATUS_MALFORMED_CRYPTO_PROTOCOL,
NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION,
NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL,
NOTMUCH_STATUS_MALFORMED_CRYPTO_PROTOCOL,
NOTMUCH_STATUS_FAILED_CRYPTO_CONTEXT_CREATION,
NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL,
+ NOTMUCH_STATUS_NO_CONFIG,
NOTMUCH_STATUS_LAST_STATUS
} notmuch_status_t;
typedef enum {
NOTMUCH_STATUS_LAST_STATUS
} notmuch_status_t;
typedef enum {
PathError,
capi.lib.NOTMUCH_STATUS_ILLEGAL_ARGUMENT:
IllegalArgumentError,
PathError,
capi.lib.NOTMUCH_STATUS_ILLEGAL_ARGUMENT:
IllegalArgumentError,
+ capi.lib.NOTMUCH_STATUS_NO_CONFIG:
+ NoConfigError,
class UpgradeRequiredError(NotmuchError): pass
class PathError(NotmuchError): pass
class IllegalArgumentError(NotmuchError): pass
class UpgradeRequiredError(NotmuchError): pass
class PathError(NotmuchError): pass
class IllegalArgumentError(NotmuchError): pass
+class NoConfigError(NotmuchError): pass
class ObjectDestroyedError(NotmuchError):
"""The object has already been destroyed and it's memory freed.
class ObjectDestroyedError(NotmuchError):
"""The object has already been destroyed and it's memory freed.
* something that notmuch doesn't know how to handle.
*/
NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL,
* something that notmuch doesn't know how to handle.
*/
NOTMUCH_STATUS_UNKNOWN_CRYPTO_PROTOCOL,
+ /**
+ * Unable to load a config file
+ */
+ NOTMUCH_STATUS_NO_CONFIG,
/**
* Not an actual status value. Just a way to find out how many
* valid status values there are.
/**
* Not an actual status value. Just a way to find out how many
* valid status values there are.
*key_file = g_key_file_new ();
if (! g_key_file_load_from_file (*key_file, path, G_KEY_FILE_NONE, NULL)) {
*key_file = g_key_file_new ();
if (! g_key_file_load_from_file (*key_file, path, G_KEY_FILE_NONE, NULL)) {
- status = NOTMUCH_STATUS_FILE_ERROR;
+ status = NOTMUCH_STATUS_NO_CONFIG;