Loading...
Searching...
No Matches
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

## ◆ Exception() [1/3]

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

Constructs an Exception with no specified detail message.

Definition at line 31 of file Exception.h.

## ◆ Exception() [2/3]

pdftron::Common::Exception::Exception | ( | TRN_Exception | e | ) |

## ◆ Exception() [3/3]

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.

## ◆ ~Exception()

pdftron::Common::Exception::~Exception | ( |  | ) |
throw | ( | ) |  |  |
| inline

Definition at line 51 of file Exception.h.

## Member Function Documentation

## ◆ GetCondExpr()

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

Returns
  the conditional expression that caused the exception

## ◆ GetErrorCode()

TRN_UInt32 pdftron::Common::Exception::GetErrorCode | ( |  | ) |

Returns
  the error code of this Exception object.

## ◆ GetFileName()

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

Returns
  the filename indicating where the exception occurred

## ◆ GetFunction()

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

Returns
  the function name where the exception occurred

## ◆ GetLineNumber()

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

Returns
  the line number indicating where the exception occurred

## ◆ GetMessage()

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

Returns
  the error message string of this Exception object.

## ◆ Print()

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

Print out the Exception to the output stream.

## ◆ ToString()

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

Returns
  a full description of this Exception object.

## ◆ what()

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

## ◆ e

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:

- Common/Exception.h