exception.h
Go to the documentation of this file.
#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)) {}
Exception(const std::string& _msg) : msg_(std::string(_msg)) {}
const std::string& what() {
return msg_;
}
virtual ~Exception() = default;
protected:
std::string msg_;
};
} // namespace CocoaTweet::Exception
#endif
CocoaTweet::Exception::Exception::what
const std::string & what()
Definition: exception.h:12
CocoaTweet::Exception::Exception::~Exception
virtual ~Exception()=default
CocoaTweet::Exception::Exception::Exception
Exception(const char *_msg)
Definition: exception.h:10
CocoaTweet::Exception
Definition: authenticateException.h:6
CocoaTweet::Exception::Exception::msg_
std::string msg_
Definition: exception.h:18
CocoaTweet::Exception::Exception::Exception
Exception(const std::string &_msg)
Definition: exception.h:11
CocoaTweet::Exception::Exception
Definition: exception.h:8