Mercurial > projects > xwrited
changeset 11:fd2e275436a4
Display error messages and free errors
author | Guido Berhoerster <guido+xwrited@berhoerster.name> |
---|---|
date | Mon, 16 Mar 2015 19:58:21 +0100 |
parents | 1ec432967d62 |
children | 6440ba6e3466 |
files | main.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Fri Jan 09 17:15:34 2015 +0100 +++ b/main.c Mon Mar 16 19:58:21 2015 +0100 @@ -146,11 +146,17 @@ regex = g_regex_new("([\r\a]+|[ \t\r\a]+$)", G_REGEX_MULTILINE, 0, &error); if (error != NULL) { + g_critical("failed to create regex object: %s", + error->message); + g_error_free(error); goto out; } body = g_regex_replace_literal(regex, utf8_str->str, -1, 0, "", 0, &error); if (error != NULL) { + g_critical("failed to replace control and space characters: " + "%s", error->message); + g_error_free(error); goto out; }