utils: parsePath() returns GError on failure

Better error messages.
This commit is contained in:
Max Kellermann
2011-09-09 22:35:15 +02:00
parent 61fc01e79e
commit b42a8d2364
4 changed files with 31 additions and 15 deletions

View File

@@ -190,11 +190,11 @@ fifo_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
return NULL;
}
path = parsePath(value);
path = parsePath(value, error);
g_free(value);
if (!path) {
g_set_error(error, fifo_output_quark(), errno,
"Could not parse \"path\" parameter");
g_prefix_error(error, "Invalid path in line %i: ",
param->line);
return NULL;
}