forked from organicmaps/organicmaps
Generalized exception handling during server response parsing to catch all possible exceptions
This commit is contained in:
parent
032601d317
commit
28104b6dc5
1 changed files with 4 additions and 2 deletions
|
@ -250,8 +250,10 @@ void Purchase::ValidateImpl(std::string const & url, ValidationInfo const & vali
|
|||
coding::DeserializerJson deserializer(request.ServerResponse());
|
||||
deserializer(result);
|
||||
}
|
||||
catch(coding::DeserializerJson::Exception const &) {}
|
||||
|
||||
catch(std::exception const & e)
|
||||
{
|
||||
LOG(LWARNING, ("Bad server response. Code =", resultCode, ". Reason =", e.what()));
|
||||
}
|
||||
if (!result.m_reason.empty())
|
||||
LOG(LWARNING, ("Validation error:", result.m_reason));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue