Give exmples in error message unsupported case-changing escape

sequences. (503222)

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

svn path=/trunk/; revision=6113
This commit is contained in:
Mathias Hasselmann 2007-12-13 15:08:59 +00:00
parent 9a886dbe73
commit 69f071c88b
2 changed files with 13 additions and 2 deletions

View File

@ -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):

View 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");