SaxonC 12.5
Saxon Processor library for C/C++, PHP and Python
Loading...
Searching...
No Matches
SaxonApiException.h
1#ifndef SAXON_API_EXCEPTION_H
2#define SAXON_API_EXCEPTION_H
3
5// Copyright (c) 2022 - 2023 Saxonica Limited.
6// This Source Code Form is subject to the terms of the Mozilla Public License,
7// v. 2.0. If a copy of the MPL was not distributed with this file, You can
8// obtain one at http://mozilla.org/MPL/2.0/. This Source Code Form is
9// "Incompatible With Secondary Licenses", as defined by the Mozilla Public
10// License, v. 2.0.
12
13#include "SaxonProcessor.h"
14#include <exception>
15#include <iostream>
16
17class SaxonProcessor;
18
23class SaxonApiException : public std::exception {
24
25public:
29 SaxonApiException(bool staticError = false);
30
35 SaxonApiException(const char *err);
36
42
48 virtual const char *what();
49
60 SaxonApiException(const char *message, const char *errorCode,
61 const char *systemId, int linenumber);
62
66 virtual ~SaxonApiException() throw();
67
73 const char *getErrorCode();
74
81 int getLineNumber();
82
89 const char *getMessage();
90
98 const char *getMessageWithErrorCode();
99
107 const char *getCombinedStaticErrorMessages();
108
109
113 int staticErrorCount();
114
118 const char *getSystemId();
119
120private:
121 bool cppException;
122 bool isStaticError;
123 std::string message;
124 std::string s_message;
125 std::string ec_message;
126 int lineNumber;
127 std::string errorCode;
128 std::string systemId;
129};
130
131#endif /* SAXON_API_EXCEPTION_H */
Definition SaxonApiException.h:23
const char * getMessage()
Definition SaxonApiException.cpp:149
const char * getSystemId()
Definition SaxonApiException.cpp:135
const char * getErrorCode()
Definition SaxonApiException.cpp:114
int getLineNumber()
Definition SaxonApiException.cpp:128
const char * getMessageWithErrorCode()
Definition SaxonApiException.cpp:170
SaxonApiException(bool staticError=false)
Definition SaxonApiException.cpp:32
virtual const char * what()
Definition SaxonApiException.cpp:11
int staticErrorCount()
Definition SaxonApiException.cpp:206
virtual ~SaxonApiException()
Definition SaxonApiException.cpp:89
const char * getCombinedStaticErrorMessages()
Definition SaxonApiException.cpp:191
Definition SaxonProcessor.h:117