All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::Common::Exception Class Reference

#include <Exception.h>

+ Inheritance diagram for pdftron::Common::Exception:

Public Member Functions

 Exception ()
 
 Exception (TRN_Exception e)
 
 Exception (const char *cond_expr, TRN_Int32 line_number, const char *file_name, const char *function, const char *message, TRN_UInt32 error_code=0)
 
 ~Exception () throw ()
 
const char * GetCondExpr ()
 
const char * GetFileName ()
 
TRN_Int32 GetLineNumber ()
 
const char * GetFunction ()
 
const char * GetMessage ()
 
std::string ToString ()
 
std::ostream & Print (std::ostream &stream)
 
TRN_UInt32 GetErrorCode ()
 
virtual const char * what () const throw ()
 

Public Attributes

TRN_Exception e
 

Detailed Description

Exception is derived from standard C++ exception class and it is a superclass for all PDFNet library exceptions.

Exception and its subclasses have two constructors: one that takes no arguments and one that takes a string argument that can be used to report an error message.

Definition at line 24 of file Exception.h.

Constructor & Destructor Documentation

pdftron::Common::Exception::Exception ( )
inline

Constructs an Exception with no specified detail message.

Definition at line 31 of file Exception.h.

pdftron::Common::Exception::Exception ( TRN_Exception  e)
pdftron::Common::Exception::Exception ( const char *  cond_expr,
TRN_Int32  line_number,
const char *  file_name,
const char *  function,
const char *  message,
TRN_UInt32  error_code = 0 
)

Constructs an Exception with detailed error info.

Parameters
cond_expr- conditional expression that failed.
line_number- line number where the exception occurred.
file_name- file name where the exception occurred.
function- function in which the exception occurred.
message- detailed error message.
pdftron::Common::Exception::~Exception ( )
throw (
)
inline

Definition at line 51 of file Exception.h.

Member Function Documentation

const char* pdftron::Common::Exception::GetCondExpr ( )
Returns
the conditional expression that caused the exception
TRN_UInt32 pdftron::Common::Exception::GetErrorCode ( )
Returns
the error code of this Exception object.
const char* pdftron::Common::Exception::GetFileName ( )
Returns
the filename indicating where the exception occurred
const char* pdftron::Common::Exception::GetFunction ( )
Returns
the function name where the exception occurred
TRN_Int32 pdftron::Common::Exception::GetLineNumber ( )
Returns
the line number indicating where the exception occurred
const char* pdftron::Common::Exception::GetMessage ( )
Returns
the error message string of this Exception object.
std::ostream& pdftron::Common::Exception::Print ( std::ostream &  stream)

Print out the Exception to the output stream.

std::string pdftron::Common::Exception::ToString ( )
Returns
a full description of this Exception object.
virtual const char* pdftron::Common::Exception::what ( ) const
throw (
)
virtual

Returns the full error message string.

Returns
Pointer to a null-terminated string with full error information.

Member Data Documentation

TRN_Exception pdftron::Common::Exception::e

Definition at line 99 of file Exception.h.


The documentation for this class was generated from the following file: