Error handling changed, 'auto' keyword used for MTP types.

All errors that lead to MTP request resending by default
error handler now can be handled differently. For example
inline bot requests are not being resent on 5XX error codes.
+ extensive use of auto keyword in MTP types handling.
This commit is contained in:
John Preston
2016-04-08 14:44:35 +04:00
parent 35d5089f48
commit 8e89486fbc
41 changed files with 587 additions and 535 deletions
+2 -2
View File
@@ -384,7 +384,7 @@ void ProfileInner::blockDone(bool blocked, const MTPBool &result) {
}
bool ProfileInner::blockFail(const RPCError &error) {
if (mtpIsFlood(error)) return false;
if (MTP::isDefaultHandledError(error)) return false;
_blockRequest = 0;
return false;
@@ -1364,7 +1364,7 @@ void ProfileInner::migrateDone(const MTPUpdates &updates) {
}
bool ProfileInner::migrateFail(const RPCError &error) {
if (mtpIsFlood(error)) return false;
if (MTP::isDefaultHandledError(error)) return false;
Ui::hideLayer();
return true;
}