Give exmples in error message unsupported case-changing escape
authorMathias Hasselmann <hasselmm@src.gnome.org>
Thu, 13 Dec 2007 15:08:59 +0000 (15:08 +0000)
committerMathias Hasselmann <hasselmm@src.gnome.org>
Thu, 13 Dec 2007 15:08:59 +0000 (15:08 +0000)
sequences. (503222)

* glib/gregex.c: Add examples to error message for PCRE-ERR37.

svn path=/trunk/; revision=6113

ChangeLog
glib/gregex.c

index 7e75956..b3ebc28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-13  Mathias Hasselmann  <mathias@openismus.com>
+
+       Give exmples in error message unsupported case-changing escape
+       sequences. (503222)
+
+       * glib/gregex.c: Add examples to error message for PCRE-ERR37.
+
 2007-12-13  Bastien Nocera  <hadess@hadess.net>
 
        * glib/gtimer.c: (g_time_val_from_iso8601):
index 26d89d9..fa9cefb 100644 (file)
@@ -189,7 +189,8 @@ translate_compile_error (gint *errcode, gchar **errmsg)
    * G_REGEX_ERROR_COMPILE error code in errcode and keep the
    * untranslated error message returned by PCRE.
    * Note that there can be more PCRE errors with the same GRegexError
-   * and that some PCRE errors are useless for us. */
+   * and that some PCRE errors are useless for us.
+   */
   *errcode += 100;
 
   switch (*errcode)
@@ -204,8 +205,11 @@ translate_compile_error (gint *errcode, gchar **errmsg)
       *errmsg = _("unrecognized character follows \\");
       break;
     case 137:
+      /* A number of Perl escapes are not handled by PCRE.
+       * Therefore it explicitly raises ERR37.
+       */
       *errcode = G_REGEX_ERROR_UNRECOGNIZED_ESCAPE;
-      *errmsg = _("case changing escapes are not allowed here");
+      *errmsg = _("case-changing escapes (\\l, \\L, \\u, \\U) are not allowed here");
       break;
     case G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER:
       *errmsg = _("numbers out of order in {} quantifier");