SILVERCODERS DocToText
4.0.1512
Converts DOC, XLS, XLSB, PPT, RTF, ODF (ODT, ODS, ODP), OOXML (DOCX, XLSX, PPTX), iWork (PAGES, NUMBERS, KEYNOTE), ODFXML (FODP, FODS, FODT), PDF, EML and HTML documents to plain text. Extracts metadata and annotations.
|
#include <exception.h>
Public Member Functions | |
Exception (const std::string &first_error_message) throw () | |
Exception (const Exception &ex) throw () | |
Exception & | operator= (const Exception &ex) throw () |
const char * | what () |
std::string | getBacktrace () |
void | appendError (const std::string &error_message) |
std::list< std::string >::iterator | getErrorIterator () const |
size_t | getErrorCount () const |
This class is implementation of std::exception, which is used by DocToText. In this implementation, errors can be formed in "stack".
In order to create exception just call:
You can catch exception and add one more error:
or you can catch exception and get "backtrace":
doctotext::Exception::Exception | ( | const std::string & | first_error_message | ) | |
throw | ( | ||||
) |
The constructor.
first_error_message | first error message (gives information about cause of an error). |
void doctotext::Exception::appendError | ( | const std::string & | error_message | ) |
Adds one more error message.
std::string doctotext::Exception::getBacktrace | ( | ) |
returns a string with all error messages. Each error message is separated by "\n". Suppose we have thrown an exception:
Next, we have added one more error:
In the result getBacktrace will return a string: "First error message\nSecond error message\n"
size_t doctotext::Exception::getErrorCount | ( | ) | const |
Returns a number of error messages
std::list<std::string>::iterator doctotext::Exception::getErrorIterator | ( | ) | const |
returns a iterator to the first error message