# noexceptions.h File Reference

Declares interface that allows exceptions to be optional. More...

`#include "common.h"`

Go to the source code of this file.

## Namespaces

namespace | mysqlpp

## Classes

class | mysqlpp::OptionalExceptions
| Interface allowing a class to have optional exceptions. More...
class | mysqlpp::NoExceptions
| Disable exceptions in an object derived from OptionalExceptions. More...

## Detailed Description

Declares interface that allows exceptions to be optional.

A class may inherit from OptionalExceptions, which will add to it a mechanism by which a user can tell objects of that class to suppress exceptions. (They are enabled by default.) This module also declares a NoExceptions class, objects of which take a reference to any class derived from OptionalExceptions. The NoExceptions constructor calls the method that disables exceptions, and the destructor reverts them to the previous state. One uses the NoExceptions object within a scope to suppress exceptions in that block, without having to worry about reverting the setting when the block exits.