- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Exception.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPCommonException
6 #define PDFTRON_H_CPPCommonException
7
8 #include <typeinfo>
9 #include <string>
10 #include <memory>
11 #include <cstdio>
12 #include <C/Common/TRN_Exception.h>
13
14 namespace pdftron {
15 namespace Common {
16
24 class Exception : public std::exception
25 {
26 public:
27
31 Exception(){};
32
33 Exception(TRN_Exception e);
34
44 Exception(const char* cond_expr,
45 TRN_Int32 line_number,
46 const char* file_name,
47 const char* function,
48 const char* message,
49 TRN_UInt32 error_code = 0);
50
51 ~Exception() throw() {};
52
56 const char* GetCondExpr();
57
61 const char* GetFileName();
62
66 TRN_Int32 GetLineNumber();
67
71 const char* GetFunction();
72
76 const char* GetMessage();
77
81 std::string ToString();
82
86 std::ostream& Print(std::ostream& stream);
87
91 TRN_UInt32 GetErrorCode();
92
97 virtual const char* what() const throw();
98
99 TRN_Exception e;
100
101 };
102
103
112 inline std::ostream& operator<<(std::ostream& stream, Exception& e)
113 {
114 return e.Print(stream);
115 }
116
117 #include <Impl/Exception.inl>
118
119 }; // namespace Common
120 }; // namespace pdftron
121
122 #endif // PDFTRON_H_CPPCommonException
pdftron::Common::Exception::GetCondExpr
const char * GetCondExpr()
pdftron::Common::Exception::GetMessage
const char * GetMessage()
pdftron::Common::Exception::~Exception
~Exception()
Definition: Exception.h:51
pdftron::Common::Exception
Definition: Exception.h:24
pdftron::Common::Exception::Print
std::ostream & Print(std::ostream &stream)
pdftron::Common::Exception::GetFunction
const char * GetFunction()
pdftron::Common::Exception::ToString
std::string ToString()
pdftron::Common::Exception::GetErrorCode
TRN_UInt32 GetErrorCode()
pdftron::Common::Exception::Exception
Exception()
Definition: Exception.h:31
pdftron::Common::Exception::e
TRN_Exception e
Definition: Exception.h:99
pdftron::Common::Exception::what
virtual const char * what() const
pdftron::Common::Exception::GetFileName
const char * GetFileName()
pdftron::Common::Exception::GetLineNumber
TRN_Int32 GetLineNumber()