例外処理exception, runtime_errorの使い方
■ このスレッドは過去ログ倉庫に格納されています
0166デフォルトの名無しさん
NGNGwhatを使うために、こんなんなってたぞ↓
class HogeError : public exception {
public:
explicit HogeError(const string& _S): exception(""), _Str(_S) {}
virtual ~HogeError(){}
virtual const char *what() const{return (_Str.c_str()); }
protected:
virtual void _Doraise() const {_RAISE(*this); }
private:
string _Str;
};
組み込みコンパイラとクロスのソースとして使うことを想定してて、
下位のエラークラス派生を行わずにexceptionを派生した模様。
なんか無駄に終わったっぽいが。
■ このスレッドは過去ログ倉庫に格納されています