メジャーどこな例外クラスの作成

This commit is contained in:
keita
2021-02-23 11:53:32 +09:00
parent 255536209c
commit 5cebef5d9c
6 changed files with 78 additions and 0 deletions
+18
View File
@@ -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