diff options
author | corvid <corvid@lavabit.com> | 2012-09-14 18:49:37 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2012-09-14 18:49:37 +0000 |
commit | 2524d443bb08d9df7e823ebebb1b33c8c1948fa0 (patch) | |
tree | 1cab6ce18a575e40b17de54d65b7bdb078deb45f /src | |
parent | 73119ba8fc98a13e7f406d45dc733f7a55974b96 (diff) |
make a few BUG_MSGs more informative
Diffstat (limited to 'src')
-rw-r--r-- | src/html.cc | 8 | ||||
-rw-r--r-- | src/table.cc | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/html.cc b/src/html.cc index 6b593e59..932501e1 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1439,7 +1439,7 @@ int32_t a_Html_color_parse(DilloHtml *html, int32_t color = a_Color_parse(subtag, default_color, &err); if (err) { - BUG_MSG("color is not in \"#RRGGBB\" format\n"); + BUG_MSG("color \"%s\" is not in \"#RRGGBB\" format\n", subtag); } return color; } @@ -1459,8 +1459,8 @@ static int break; if (val[i] || !(isascii(val[0]) && isalpha(val[0]))) - BUG_MSG("'%s' value is not of the form " - "[A-Za-z][A-Za-z0-9:_.-]*\n", attrname); + BUG_MSG("'%s' value \"%s\" is not of the form " + "[A-Za-z][A-Za-z0-9:_.-]*\n", attrname, val); return !(val[i]); } @@ -2413,7 +2413,7 @@ static void Html_add_anchor(DilloHtml *html, const char *name) { _MSG("Registering ANCHOR: %s\n", name); if (!HT2TB(html)->addAnchor (name, html->styleEngine->style ())) - BUG_MSG("Anchor names must be unique within the document\n"); + BUG_MSG("Anchor names must be unique within the document ('%s')\n",name); /* * According to Sec. 12.2.1 of the HTML 4.01 spec, "anchor names that * differ only in case may not appear in the same document", but diff --git a/src/table.cc b/src/table.cc index d66b32b0..27de6bfc 100644 --- a/src/table.cc +++ b/src/table.cc @@ -349,11 +349,13 @@ static void Html_tag_open_table_cell(DilloHtml *html, switch (S_TOP(html)->table_mode) { case DILLO_HTML_TABLE_MODE_NONE: - BUG_MSG("<td> or <th> outside <table>\n"); + BUG_MSG("<t%c> outside <table>\n", + (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h'); return; case DILLO_HTML_TABLE_MODE_TOP: - BUG_MSG("<td> or <th> outside <tr>\n"); + BUG_MSG("<t%c> outside <tr>\n", + (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h'); /* a_Dw_table_add_cell takes care that dillo does not crash. */ /* continues */ case DILLO_HTML_TABLE_MODE_TR: @@ -402,7 +404,8 @@ static void Html_tag_content_table_cell(DilloHtml *html, return; case DILLO_HTML_TABLE_MODE_TOP: - BUG_MSG("<td> or <th> outside <tr>\n"); + BUG_MSG("<t%c> outside <tr>\n", + (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h'); /* a_Dw_table_add_cell takes care that dillo does not crash. */ /* continues */ case DILLO_HTML_TABLE_MODE_TR: |