The DbEnv::appexit method closes the initialized Berkeley DB subsystems, freeing
any allocated resources and closing any underlying subsystems.
In multi-threaded applications, only a single thread may call
method either returns errno or throws an exception that
encapsulates an errno on failure, and 0 on success.
If a fatal error occurs in Berkeley DB, the DbEnv::appexit method may fail and either
return DB_RUNRECOVERY or throw an exception encapsulating DB_RUNRECOVERY,
at which point all subsequent database calls will also fail in the same
way. Methods marked as returning errno will, by default, throw
an exception that encapsulates the error information. The default error
behavior can be changed, see DbException.