This commit is contained in:
keita
2021-02-25 18:20:16 +09:00
parent f27fe13c41
commit b28bead5c8
7 changed files with 15 additions and 12 deletions
+3
View File
@@ -1,5 +1,6 @@
#include <cocoatweet/api/model/tweet.h>
#include <cocoatweet/exception/tweetNotFoundException.h>
#include <cocoatweet/exception/authenticateException.h>
#include "nlohmann/json.hpp"
#include <iostream>
@@ -16,6 +17,8 @@ Tweet Tweet::parse(const unsigned int _responseCode, const std::string& _json) {
auto message = j["errors"][0]["message"];
if (error.get<int>() == 144) {
throw CocoaTweet::Exception::TweetNotFoundException(message.get<std::string>().c_str());
}else if(errot.get<int>() == 32){
throw CocoaTweet::Exception::AuthenticateFoundException(message.get<std::string>().c_str());
}
}