lib/expat: use C++ exceptions instead of class Error

This commit is contained in:
Max Kellermann
2016-02-06 08:45:19 +01:00
parent cd2f65aafc
commit 6c5bc9b4a3
11 changed files with 108 additions and 174 deletions

View File

@@ -135,13 +135,10 @@ UPnPDeviceDirectory::Explore()
ContentDirectoryDescriptor d(std::move(tsk->device_id),
MonotonicClockS(), tsk->expires);
{
Error error2;
bool success = d.Parse(tsk->url, buf, error2);
if (!success) {
LogError(error2);
continue;
}
try {
d.Parse(tsk->url, buf);
} catch (const std::exception &e) {
LogError(e);
}
LockAdd(std::move(d));