追加したexceptionの登録
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
#include <cocoatweet/exception/tokenInvalidException.h>
|
#include <cocoatweet/exception/tokenInvalidException.h>
|
||||||
#include <cocoatweet/exception/missingRequiredParamException.h>
|
#include <cocoatweet/exception/missingRequiredParamException.h>
|
||||||
#include <cocoatweet/exception/credentialNotAllowedException.h>
|
#include <cocoatweet/exception/credentialNotAllowedException.h>
|
||||||
|
#include <cocoatweet/exception/credentialNotVerifiedException.h>
|
||||||
|
#include <cocoatweet/exception/invalidateTokenException.h>
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -136,6 +138,12 @@ void HttpGet::process(std::weak_ptr<CocoaTweet::Authentication::AuthenticatorBas
|
|||||||
} else if (error.get<int>() == 220) {
|
} else if (error.get<int>() == 220) {
|
||||||
throw CocoaTweet::Exception::CredentialNotAllowedException(
|
throw CocoaTweet::Exception::CredentialNotAllowedException(
|
||||||
message.get<std::string>().c_str());
|
message.get<std::string>().c_str());
|
||||||
|
} else if (error.get<int>() == 99) {
|
||||||
|
throw CocoaTweet::Exception::CredentialNotVerifiedException(
|
||||||
|
message.get<std::string>().c_str());
|
||||||
|
} else if (error.get<int>() == 348) {
|
||||||
|
throw CocoaTweet::Exception::InvalidateTokenException(
|
||||||
|
message.get<std::string>().c_str());
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#include <cocoatweet/exception/tokenInvalidException.h>
|
#include <cocoatweet/exception/tokenInvalidException.h>
|
||||||
#include <cocoatweet/exception/missingRequiredParamException.h>
|
#include <cocoatweet/exception/missingRequiredParamException.h>
|
||||||
#include <cocoatweet/exception/credentialNotAllowedException.h>
|
#include <cocoatweet/exception/credentialNotAllowedException.h>
|
||||||
|
#include <cocoatweet/exception/credentialNotVerifiedException.h>
|
||||||
|
#include <cocoatweet/exception/invalidateTokenException.h>
|
||||||
#include "nlohmann/json.hpp"
|
#include "nlohmann/json.hpp"
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -153,6 +155,12 @@ void HttpPost::process(std::weak_ptr<CocoaTweet::Authentication::AuthenticatorBa
|
|||||||
} else if (error.get<int>() == 220) {
|
} else if (error.get<int>() == 220) {
|
||||||
throw CocoaTweet::Exception::CredentialNotAllowedException(
|
throw CocoaTweet::Exception::CredentialNotAllowedException(
|
||||||
message.get<std::string>().c_str());
|
message.get<std::string>().c_str());
|
||||||
|
} else if (error.get<int>() == 99) {
|
||||||
|
throw CocoaTweet::Exception::CredentialNotVerifiedException(
|
||||||
|
message.get<std::string>().c_str());
|
||||||
|
} else if (error.get<int>() == 348) {
|
||||||
|
throw CocoaTweet::Exception::InvalidateTokenException(
|
||||||
|
message.get<std::string>().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user