new flag G_MARKUP_PREFIX_ERROR_POSITION to cause the parser to prepend

006-11-15  Ryan Lortie  <desrt@desrt.ca>

        * docs/reference/glib/tmpl/markup.sgml:
        * glib/gmarkup.h:
        * glib/gmarkup.c: new flag G_MARKUP_PREFIX_ERROR_POSITION to cause the
        parser to prepend location information (ie: "Error on line %d, char
        %d:") to errors generated by the GMarkupParser callbacks.

        Closes #496046.

svn path=/trunk/; revision=5860
This commit is contained in:
Ryan Lortie
2007-11-16 03:36:51 +00:00
committed by Ryan Lortie
parent f2a5aa6700
commit 1e2c77ecbc
4 changed files with 43 additions and 25 deletions

View File

@@ -102,7 +102,7 @@ Error codes returned by markup parsing.
@G_MARKUP_ERROR_PARSE: document was ill-formed
@G_MARKUP_ERROR_UNKNOWN_ELEMENT: error should be set by #GMarkupParser functions; element wasn't known
@G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE: error should be set by #GMarkupParser functions; attribute wasn't known
@G_MARKUP_ERROR_INVALID_CONTENT: error should be set by #GMarkupParser functions; something was wrong with contents of the document, e.g. invalid attribute value
@G_MARKUP_ERROR_INVALID_POSITION: error should be set by #GMarkupParser functions; something was wrong with contents of the document, e.g. invalid attribute value
<!-- ##### MACRO G_MARKUP_ERROR ##### -->
<para>
@@ -124,6 +124,11 @@ Flags that affect the behaviour of the parser.
the parser. Instead, the content of the section (without the
<literal>&lt;![CDATA[</literal> and <literal>]]&gt;</literal>) is
passed to the @text function. This flag was added in GLib 2.12.
@G_MARKUP_PREFIX_ERROR_POSITION: Normally errors caught by GMarkup
itself have line/column information prefixed to them to let the
caller know the location of the error. When this flag is set the
location information is also prefixed to errors generated by the
#GMarkupParser implementation functions.
<!-- ##### STRUCT GMarkupParseContext ##### -->
<para>