summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 14:29:53 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-05 14:30:30 +0100
commit6ba199c7d7bee1909107ee0b8cbaf749c575b310 (patch)
tree9932d32f3fd90c341022257d6c22061fe990725c /content/content.h
parent2171f13ab334716250ca2bc53946806f7a88c8a3 (diff)
downloadnetsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.gz
netsurf-6ba199c7d7bee1909107ee0b8cbaf749c575b310.tar.bz2
Content messages: Remove ERRORCODE, rework ERROR
This reworks CONTENT_MSG_ERROR to be structured data and removes the CONTENT_MSG_ERRORCODE message kind. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/content/content.h b/content/content.h
index 304384b8f..4fdcaf2c0 100644
--- a/content/content.h
+++ b/content/content.h
@@ -65,7 +65,6 @@ typedef enum {
CONTENT_MSG_READY, /**< may be displayed */
CONTENT_MSG_DONE, /**< finished */
CONTENT_MSG_ERROR, /**< error occurred */
- CONTENT_MSG_ERRORCODE, /**< error occurred return nserror */
CONTENT_MSG_REDIRECT, /**< fetch url redirect occured */
CONTENT_MSG_STATUS, /**< new status string */
CONTENT_MSG_REFORMAT, /**< content_reformat done */
@@ -112,10 +111,17 @@ union content_msg_data {
const struct llcache_query_msg *query_msg;
/** CONTENT_MSG_QUERY_FINISHED - Query from underlying object finished */
void *query_finished_pw;
- /** CONTENT_MSG_ERROR - Error message */
- const char *error;
- /** CONTENT_MSG_ERRORCODE - Error code */
- nserror errorcode;
+ /** CONTENT_MSG_ERROR - Error from content or underlying fetch */
+ struct {
+ nserror errorcode; /**< The error code to convey meaning */
+ const char *errormsg; /**< The message.
+ * if NSERROR_UNKNOWN then this is the
+ * direct message, otherwise is some
+ * kind of metadata (e.g. a message name
+ * or somesuch) but always a nul
+ * terminated string.
+ */
+ } errordata;
/** CONTENT_MSG_REDIRECT - Redirect info */
struct {
struct nsurl *from; /**< Redirect origin */