XmlManager::verifyContainer

API Ref

#include <DbXml.hpp>

void XmlManager::verifyContainer(const std::string &name, std::ostream *out, u_int32_t flags);


Description: XmlManager::verifyContainer

Checks that the container data files are not corrupt, and optionally writes the salvaged container data to the specified output stream.

The container must be closed; the system throws an exception if the container is open.

The container must have been opened at least once; the system throws an exception if the underlying files have not yet been created.

Parameters

name
The name of the container to be verified.
out
The stream the salvaged container data is to be dumped to.
flags
Flags must be set to zero, DB_SALVAGE, or DB_SALVAGE and DB_AGGRESSIVE. Please refer to the Berkeley DB reference manual for a full discussion of these values.

Errors

The XmlManager::verifyContainer method may fail and throw XmlException, encapsulating one of the following non-zero errors:

CONTAINER_OPEN
The container is open.
DATABASE_ERROR
An error occurred in an underlying Berkeley DB database. The XmlException::getDbErrno method will return the error code for the error.

APIRef

Copyright (c) 1996,2007 Oracle. All rights reserved.