OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
XLException.hpp
Go to the documentation of this file.
1/*
2 * OpenXLSX-NX - Modern High-Performance C++ Excel Library
3 *
4 * Original work Copyright (c) 2018-2025, Kenneth Troldal Balslev and OpenXLSX contributors
5 * Modified work Copyright (c) 2026, Curry Tang and OpenXLSX-NX contributors
6 *
7 * Distributed under the BSD 3-Clause License.
8 * See LICENSE.md in the project root or https://opensource.org/licenses/BSD-3-Clause
9 */
10
11#ifndef OPENXLSX_XLEXCEPTION_HPP
12#define OPENXLSX_XLEXCEPTION_HPP
13
14#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
15# pragma warning(push)
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
18#endif // _MSC_VER
19
20// ===== External Includes ===== //
21#include <stdexcept> // std::runtime_error
22#include <string> // std::string - Issue #278 should be resolved by this
23
24// ===== OpenXLSX Includes ===== //
25#include "OpenXLSX-Exports.hpp"
26
27namespace OpenXLSX
28{
32 class OPENXLSX_EXPORT XLException : public std::runtime_error
33 {
34 public:
35 explicit XLException(const std::string& err) : runtime_error(err) {};
36 };
37
41 class OPENXLSX_EXPORT XLOverflowError : public XLException
42 {
43 public:
44 explicit XLOverflowError(const std::string& err) : XLException(err) {};
45 };
46
50 class OPENXLSX_EXPORT XLValueTypeError : public XLException
51 {
52 public:
53 explicit XLValueTypeError(const std::string& err) : XLException(err) {};
54 };
55
59 class OPENXLSX_EXPORT XLCellAddressError : public XLException
60 {
61 public:
62 explicit XLCellAddressError(const std::string& err) : XLException(err) {};
63 };
64
68 class OPENXLSX_EXPORT XLInputError : public XLException
69 {
70 public:
71 explicit XLInputError(const std::string& err) : XLException(err) {};
72 };
73
77 class OPENXLSX_EXPORT XLInternalError : public XLException
78 {
79 public:
80 explicit XLInternalError(const std::string& err) : XLException(err) {};
81 };
82
86 class OPENXLSX_EXPORT XLPropertyError : public XLException
87 {
88 public:
89 explicit XLPropertyError(const std::string& err) : XLException(err) {};
90 };
91
95 class OPENXLSX_EXPORT XLSheetError : public XLException
96 {
97 public:
98 explicit XLSheetError(const std::string& err) : XLException(err) {};
99 };
100
104 class OPENXLSX_EXPORT XLDateTimeError : public XLException
105 {
106 public:
107 explicit XLDateTimeError(const std::string& err) : XLException(err) {};
108 };
109
113 class OPENXLSX_EXPORT XLFormulaError : public XLException
114 {
115 public:
116 explicit XLFormulaError(const std::string& err) : XLException(err) {};
117 };
118
119} // namespace OpenXLSX
120
121#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
122# pragma warning(pop)
123#endif // _MSC_VER
124
125#endif // OPENXLSX_XLEXCEPTION_HPP
XLCellAddressError(const std::string &err)
Definition XLException.hpp:62
XLDateTimeError(const std::string &err)
Definition XLException.hpp:107
XLException(const std::string &err)
Definition XLException.hpp:35
XLFormulaError(const std::string &err)
Definition XLException.hpp:116
XLInputError(const std::string &err)
Definition XLException.hpp:71
XLInternalError(const std::string &err)
Definition XLException.hpp:80
XLOverflowError(const std::string &err)
Definition XLException.hpp:44
XLPropertyError(const std::string &err)
Definition XLException.hpp:89
XLSheetError(const std::string &err)
Definition XLException.hpp:98
XLValueTypeError(const std::string &err)
Definition XLException.hpp:53
Definition IXLCellProvider.hpp:24