diff --git a/src/cocoatweet/exception/authenticateException.h b/src/cocoatweet/exception/authenticateException.h new file mode 100644 index 0000000..ecf4027 --- /dev/null +++ b/src/cocoatweet/exception/authenticateException.h @@ -0,0 +1,12 @@ +#ifndef COCOATWEET_EXCEPTION_AUTHENTICATEEXCEPTION_H_ +#define COCOATWEET_EXCEPTION_AUTHENTICATEEXCEPTION_H_ + +#include + +namespace CocoaTweet::Exception{ + class AuthenticateException final: Exception{ + using Exception::Exception; + }; +} + +#endif diff --git a/src/cocoatweet/exception/exception.h b/src/cocoatweet/exception/exception.h new file mode 100644 index 0000000..3e2572f --- /dev/null +++ b/src/cocoatweet/exception/exception.h @@ -0,0 +1,18 @@ +#ifndef COCOATWEET_EXCEPTION_EXCEPTION_H_ +#define COCOATWEET_EXCEPTION_EXCEPTION_H_ + +#include +#include + +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 diff --git a/src/cocoatweet/exception/rateLimitException.h b/src/cocoatweet/exception/rateLimitException.h new file mode 100644 index 0000000..3457347 --- /dev/null +++ b/src/cocoatweet/exception/rateLimitException.h @@ -0,0 +1,12 @@ +#ifndef COCOATWEET_EXCEPTION_RATELIMITEXCEPTION_H_ +#define COCOATWEET_EXCEPTION_RATELIMITEXCEPTION_H_ + +#include + +namespace CocoaTweet::Exception{ + class RateLimitException final: Exception{ + using Exception::Exception; + }; +} + +#endif diff --git a/src/cocoatweet/exception/tweetDuplicateException.h b/src/cocoatweet/exception/tweetDuplicateException.h new file mode 100644 index 0000000..385f82c --- /dev/null +++ b/src/cocoatweet/exception/tweetDuplicateException.h @@ -0,0 +1,12 @@ +#ifndef COCOATWEET_EXCEPTION_TWEETDUPLICATEEXCEPTION_H_ +#define COCOATWEET_EXCEPTION_TWEETDUPLICATEEXCEPTION_H_ + +#include + +namespace CocoaTweet::Exception{ + class TweetDuplicateException final: Exception{ + using Exception::Exception; + }; +} + +#endif diff --git a/src/cocoatweet/exception/tweetNotFoundException.h b/src/cocoatweet/exception/tweetNotFoundException.h new file mode 100644 index 0000000..05fd98d --- /dev/null +++ b/src/cocoatweet/exception/tweetNotFoundException.h @@ -0,0 +1,12 @@ +#ifndef COCOATWEET_EXCEPTION_TWEETNOTFOUNDEXCEPTION_H_ +#define COCOATWEET_EXCEPTION_TWEETNOTFOUNDEXCEPTION_H_ + +#include + +namespace CocoaTweet::Exception{ + class TweetNotFoundException final: Exception{ + using Exception::Exception; + }; +} + +#endif diff --git a/src/cocoatweet/exception/tweetTooLongException.h b/src/cocoatweet/exception/tweetTooLongException.h new file mode 100644 index 0000000..2aaed1f --- /dev/null +++ b/src/cocoatweet/exception/tweetTooLongException.h @@ -0,0 +1,12 @@ +#ifndef COCOATWEET_EXCEPTION_TWEETTOOLONGEXCEPTION_H_ +#define COCOATWEET_EXCEPTION_TWEETTOOLONGEXCEPTION_H_ + +#include + +namespace CocoaTweet::Exception{ + class TweetTooLongException final: Exception{ + using Exception::Exception; + }; +} + +#endif