# HG changeset patch # User Guido Berhoerster # Date 1426532301 -3600 # Node ID fd2e275436a4d6a8750847d228cde85ffeae7ad1 # Parent 1ec432967d62114350d738935fbfe4893994a78f Display error messages and free errors diff -r 1ec432967d62 -r fd2e275436a4 main.c --- 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; }