| 528 | } |
| 529 | |
| 530 | [[gnu::pure]] |
| 531 | static std::runtime_error |
| 532 | MakeDecoderError(const DetachedSong &song, const char *msg) noexcept |
| 533 | { |
| 534 | const char *error_uri = song.GetURI(); |
| 535 | const std::string allocated = uri_remove_auth(error_uri); |
| 536 | if (!allocated.empty()) |
| 537 | error_uri = allocated.c_str(); |
| 538 | |
| 539 | return FmtRuntimeError("Failed to decode {:?}: {}", error_uri, msg); |
| 540 | } |
| 541 | |
| 542 | /** |
| 543 | * Decode a song addressed by a #DetachedSong. |
no test coverage detected