From 0bd25f1e17739c364971d3bf6fbdf7e04cc4519b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Jul 2016 16:59:17 +0200 Subject: [PATCH] decoder/sidplay: log detailed error message --- NEWS | 1 + src/decoder/plugins/SidplayDecoderPlugin.cxx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index fdf221c66..42765cba4 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ver 0.19.18 (not yet released) - ffmpeg: log detailed error message - ffmpeg: support FFmpeg 3.1 - sidplay: detect libsidplay2 with pkg-config + - sidplay: log detailed error message * output - shout: recognize setting "encoder" instead of "encoding" * require gcc 4.7 or newer diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx index 673b1fbba..8b4bd927b 100644 --- a/src/decoder/plugins/SidplayDecoderPlugin.cxx +++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx @@ -154,7 +154,8 @@ sidplay_file_decode(Decoder &decoder, Path path_fs) const auto container = ParseContainerPath(path_fs); SidTuneMod tune(container.path.c_str()); if (!tune.getStatus()) { - LogWarning(sidplay_domain, "failed to load file"); + FormatWarning(sidplay_domain, "failed to load file: %s", + tune.getInfo().statusString); return; } @@ -180,13 +181,15 @@ sidplay_file_decode(Decoder &decoder, Path path_fs) ReSIDBuilder builder("ReSID"); builder.create(player.info().maxsids); if (!builder) { - LogWarning(sidplay_domain, "ReSIDBuilder.create() failed"); + FormatWarning(sidplay_domain, "ReSIDBuilder.create() failed: %s", + builder.error()); return; } builder.filter(filter_setting); if (!builder) { - LogWarning(sidplay_domain, "ReSIDBuilder.filter() failed"); + FormatWarning(sidplay_domain, "ReSIDBuilder.filter() failed: %s", + builder.error()); return; }