# HG changeset patch # User Matti Hamalainen # Date 1193736127 -7200 # Node ID 1382d265b71d420ee8710bf1f6dea633555deda8 # Parent dd5c459c5f2d8ceeb315b5aa26a3152bbfccce54 Error reporting added. diff -r dd5c459c5f2d -r 1382d265b71d src/audacious/tuple_formatter.c --- a/src/audacious/tuple_formatter.c Sun Oct 28 09:19:29 2007 -0500 +++ b/src/audacious/tuple_formatter.c Tue Oct 30 11:22:07 2007 +0200 @@ -528,6 +528,7 @@ #ifdef TUPLE_USE_COMPILER static TupleEvalContext *last_ctx = NULL; static TupleEvalNode *last_ev = NULL; + gchar *result = NULL; #endif if (initialized == FALSE) @@ -556,6 +557,12 @@ last_ctx = tuple_evalctx_new(); last_string = g_strdup(string); last_ev = tuple_formatter_compile(last_ctx, last_string); + if (last_ctx->iserror) { + fprintf(stderr, "[TuplezCC]: %s", last_ctx->errmsg); + } + if (!last_ev) { + fprintf(stderr, "[TuplezCC]: Compilation failed!\n"); + } } #ifdef TUPLE_COMPILER_DEBUG @@ -567,7 +574,11 @@ #endif tuple_evalctx_reset(last_ctx); - return tuple_formatter_eval(last_ctx, last_ev, tuple); + result = tuple_formatter_eval(last_ctx, last_ev, tuple); + if (last_ctx->iserror) { + fprintf(stderr, "[TuplezEV]: %s", last_ctx->errmsg); + } + return result; #else return tuple_formatter_process_construct(tuple, string); #endif