pdftron::Common::Exception Class Reference

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

#include <Exception.h>

List of all members.

Public Member Functions

 Exception ()
 Constructs an Exception with no specified detail message.
 Exception (TRN_Exception e)
 Exception (const char *cond_expr, TRN_Int32 line_number, const char *file_name, const char *function, const char *message)
 Constructs an Exception with detailed error info.
 ~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)
 Print out the Exception to the output stream.

Protected 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.


Constructor & Destructor Documentation

pdftron::Common::Exception::Exception (  )  [inline]

Constructs an Exception with no specified detail message.

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 
)

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]


Member Function Documentation

const char* pdftron::Common::Exception::GetCondExpr (  ) 

Returns:
the conditional expression that caused the exception

const char* pdftron::Common::Exception::GetFileName (  ) 

Returns:
the filename indicating where the exception occurred

TRN_Int32 pdftron::Common::Exception::GetLineNumber (  ) 

Returns:
the line number indicating where the exception occurred

const char* pdftron::Common::Exception::GetFunction (  ) 

Returns:
the function name where the exception occurred

const char* pdftron::Common::Exception::GetMessage (  ) 

Returns:
the error message string of this Exception object.

std::string pdftron::Common::Exception::ToString (  ) 

Returns:
a short description of this Exception object.

std::ostream& pdftron::Common::Exception::Print ( std::ostream &  stream  ) 

Print out the Exception to the output stream.

Referenced by pdftron::Common::operator<<().


Member Data Documentation

TRN_Exception pdftron::Common::Exception::e [protected]


© 2002-2010 PDFTron Systems Inc.