38 #ifndef MYSQLPP_NOEXCEPTIONS_H
39 #define MYSQLPP_NOEXCEPTIONS_H
45 #if !defined(DOXYGEN_IGNORE)
47 class MYSQLPP_EXPORT NoExceptions;
71 class MYSQLPP_EXPORT OptionalExceptions
77 OptionalExceptions(
bool e =
true) :
83 virtual ~OptionalExceptions() { }
86 void enable_exceptions()
const { exceptions_ =
true; }
89 void disable_exceptions()
const { exceptions_ =
false; }
92 bool throw_exceptions()
const {
return exceptions_; }
99 void set_exceptions(
bool e)
const { exceptions_ = e; }
103 friend class NoExceptions;
106 mutable bool exceptions_;
131 assoc_.disable_exceptions();
139 assoc_.set_exceptions(exceptions_were_enabled_);
144 bool exceptions_were_enabled_;
154 #endif // MYSQLPP_NOEXCEPTIONS_H