aboutsummaryrefslogtreecommitdiffstats
path: root/src/AudioConfig.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 18:02:44 +0200
committerMax Kellermann <max@duempel.org>2013-09-04 18:14:22 +0200
commit29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch)
tree79766830b55ebca38ddbce84d8d548227eedb69e /src/AudioConfig.cxx
parentc9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff)
downloadmpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'src/AudioConfig.cxx')
-rw-r--r--src/AudioConfig.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/AudioConfig.cxx b/src/AudioConfig.cxx
index 9ead61afe..64c9d76d5 100644
--- a/src/AudioConfig.cxx
+++ b/src/AudioConfig.cxx
@@ -23,6 +23,7 @@
#include "AudioParser.hxx"
#include "conf.h"
#include "mpd_error.h"
+#include "util/Error.hxx"
static AudioFormat configured_audio_format;
@@ -37,15 +38,13 @@ getOutputAudioFormat(AudioFormat inAudioFormat)
void initAudioConfig(void)
{
const struct config_param *param = config_get_param(CONF_AUDIO_OUTPUT_FORMAT);
- GError *error = NULL;
- bool ret;
if (param == NULL)
return;
- ret = audio_format_parse(configured_audio_format, param->value,
- true, &error);
- if (!ret)
+ Error error;
+ if (!audio_format_parse(configured_audio_format, param->value,
+ true, error))
MPD_ERROR("error parsing line %i: %s",
- param->line, error->message);
+ param->line, error.GetMessage());
}