- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
namespace {
class blah_error : public std::exception
public:
    blah_error(const char *text)
        : m_text(text)
    {}
    virtual const char *what() const throw()
    { return m_text; }
private:
    const char *m_text;
};
}
BlahApplication::BlahApplication(const some_type &some_arg)
{
  // ...
  if (SomeCheck(some_arg)) {
    throw blah_error("some error message");
  }
  // ...
} Follow us!
 Follow us!