From 5bc4ab899f444723dbb47915c438d7a8673ef44e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Sep 2013 20:59:11 +0200 Subject: *Plugin: remove redundant "line %i" from error messages The MPD core will add this as a prefeix. --- src/encoder/LameEncoderPlugin.cxx | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/encoder/LameEncoderPlugin.cxx') diff --git a/src/encoder/LameEncoderPlugin.cxx b/src/encoder/LameEncoderPlugin.cxx index d3ed49a31..a5b7be483 100644 --- a/src/encoder/LameEncoderPlugin.cxx +++ b/src/encoder/LameEncoderPlugin.cxx @@ -68,16 +68,14 @@ LameEncoder::Configure(const config_param ¶m, Error &error) if (*endptr != '\0' || quality < -1.0 || quality > 10.0) { error.Format(config_domain, "quality \"%s\" is not a number in the " - "range -1 to 10, line %i", - value, param.line); + "range -1 to 10", + value); return false; } if (param.GetBlockValue("bitrate") != nullptr) { - error.Format(config_domain, - "quality and bitrate are " - "both defined (line %i)", - param.line); + error.Set(config_domain, + "quality and bitrate are both defined"); return false; } } else { @@ -85,10 +83,8 @@ LameEncoder::Configure(const config_param ¶m, Error &error) value = param.GetBlockValue("bitrate"); if (value == nullptr) { - error.Format(config_domain, - "neither bitrate nor quality defined " - "at line %i", - param.line); + error.Set(config_domain, + "neither bitrate nor quality defined"); return false; } @@ -96,9 +92,8 @@ LameEncoder::Configure(const config_param ¶m, Error &error) bitrate = g_ascii_strtoll(value, &endptr, 10); if (*endptr != '\0' || bitrate <= 0) { - error.Format(config_domain, - "bitrate at line %i should be a positive integer", - param.line); + error.Set(config_domain, + "bitrate should be a positive integer"); return false; } } -- cgit v1.2.3