Comments
Patch
@@ -219,6 +219,8 @@ notmuch_status_to_string (notmuch_status_t status)
return "Erroneous NULL pointer";
case NOTMUCH_STATUS_TAG_TOO_LONG:
return "Tag value is too long (exceeds NOTMUCH_TAG_MAX)";
+ case NOTMUCH_STATUS_INVALID_DATE:
+ return "Date value did not parse to a valid date";
case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW:
return "Unbalanced number of calls to notmuch_message_freeze/thaw";
default:
@@ -78,6 +78,8 @@ typedef int notmuch_bool_t;
* NOTMUCH_STATUS_TAG_TOO_LONG: A tag value is too long (exceeds
* NOTMUCH_TAG_MAX)
*
+ * NOTMUCH_STATUS_INVALID_DATE: Date parsing failed
+ *
* NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW: The notmuch_message_thaw
* function has been called more times than notmuch_message_freeze.
*
@@ -96,6 +98,7 @@ typedef enum _notmuch_status {
NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID,
NOTMUCH_STATUS_NULL_POINTER,
NOTMUCH_STATUS_TAG_TOO_LONG,
+ NOTMUCH_STATUS_INVALID_DATE,
NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW,
NOTMUCH_STATUS_LAST_STATUS
@@ -431,6 +431,7 @@ add_files_recursive (notmuch_database_t *notmuch,
ret = status;
goto DONE;
default:
+ case NOTMUCH_STATUS_INVALID_DATE:
case NOTMUCH_STATUS_FILE_ERROR:
case NOTMUCH_STATUS_NULL_POINTER:
case NOTMUCH_STATUS_TAG_TOO_LONG:
This is not used yet in this commit but will be the return value in case the date parser gets handed invalid dates. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de> --- lib/database.cc | 2 ++ lib/notmuch.h | 3 +++ notmuch-new.c | 1 + 3 files changed, 6 insertions(+), 0 deletions(-)