メジャーどこな例外クラスの作成
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_AUTHENTICATEEXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_AUTHENTICATEEXCEPTION_H_
|
||||
|
||||
#include <cocoatweet/exception/exception.h>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class AuthenticateException final: Exception{
|
||||
using Exception::Exception;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_EXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_EXCEPTION_H_
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class Exception: public std::exception{
|
||||
public:
|
||||
Exception(const char* _msg):msg_(std::string(_msg)){}
|
||||
const std::string& what(){return msg_;}
|
||||
virtual ~Exception() = default;
|
||||
protected:
|
||||
std::string msg_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_RATELIMITEXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_RATELIMITEXCEPTION_H_
|
||||
|
||||
#include <cocoatweet/exception/exception.h>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class RateLimitException final: Exception{
|
||||
using Exception::Exception;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_TWEETDUPLICATEEXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_TWEETDUPLICATEEXCEPTION_H_
|
||||
|
||||
#include <cocoatweet/exception/exception.h>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class TweetDuplicateException final: Exception{
|
||||
using Exception::Exception;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_TWEETNOTFOUNDEXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_TWEETNOTFOUNDEXCEPTION_H_
|
||||
|
||||
#include <cocoatweet/exception/exception.h>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class TweetNotFoundException final: Exception{
|
||||
using Exception::Exception;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef COCOATWEET_EXCEPTION_TWEETTOOLONGEXCEPTION_H_
|
||||
#define COCOATWEET_EXCEPTION_TWEETTOOLONGEXCEPTION_H_
|
||||
|
||||
#include <cocoatweet/exception/exception.h>
|
||||
|
||||
namespace CocoaTweet::Exception{
|
||||
class TweetTooLongException final: Exception{
|
||||
using Exception::Exception;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user