Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- throw my_exception() << "The error " << error_code << " happened because of " << reasons;
- class my_exception
- {
- public:
- template <typename T>
- my_exception & operator << (const T & value)
- {
- // put the value somewhere
- return *this;
- }
- // etc.
- };
- std::stringstream s;
- s << "The error " << error_code << " happened because of " << reasons;
- throw my_exception(s.str());
Add Comment
Please, Sign In to add comment