Invoice++
Loading...
Searching...
No Matches
pdf_exception.h
Go to the documentation of this file.
1#ifndef PDF_EXCEPTION_H
2#define PDF_EXCEPTION_H
3#include <string>
4
7class PDFException : public std::exception {
8 HPDF_STATUS error_code;
9 HPDF_STATUS detail_code;
10
11public:
12 explicit PDFException(const HPDF_STATUS error_code, const HPDF_STATUS detail_code)
14 }
15
16 std::string message() const {
17 return std::format("Libharu Error Code: {:04X}\nDetail Code: {:d}", static_cast<unsigned int>(error_code),
18 static_cast<int>(detail_code));
19 }
20};
21
22#endif //PDF_EXCEPTION_H
HPDF_STATUS error_code
Definition pdf_exception.h:8
PDFException(const HPDF_STATUS error_code, const HPDF_STATUS detail_code)
Definition pdf_exception.h:12
std::string message() const
Definition pdf_exception.h:16
HPDF_STATUS detail_code
Definition pdf_exception.h:9