CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xslt_exception.h
1
2
3#pragma once
4
5#include <system/exceptions.h>
6#include <system/array.h>
7#include <cstdint>
8
9
11namespace System
12{
13namespace Xml
14{
15namespace Xsl
16{
17namespace Runtime
18{
19class DecimalFormatter;
20} // namespace Runtime
21class Details_XsltCompileException; using XsltCompileException = System::ExceptionWrapper<Details_XsltCompileException>;
22namespace XsltOld
23{
24class ApplyImportsAction;
25class ApplyTemplatesAction;
26class AttributeAction;
27class AttributeSetAction;
28class CallTemplateAction;
29class ChooseAction;
30class CompiledAction;
31class Compiler;
32class ContainerAction;
33class ElementAction;
34class InputScopeManager;
35class MessageAction;
36class NewInstructionAction;
37class NumberAction;
38class PrefixQName;
39class Processor;
40class RootAction;
41class SequentialOutput;
42class SortAction;
43class Stylesheet;
44class TemplateAction;
45class VariableAction;
46class WithParamAction;
47class XsltCompileContext;
48class XsltOutput;
49} // namespace XsltOld
50} // namespace Xsl
51} // namespace Xml
52} // namespace System
54
55namespace System {
56
57namespace Xml {
58
59namespace Xsl {
60
61class Details_XsltException;
63
65class ASPOSECPP_SHARED_CLASS Details_XsltException : public Details_SystemException
66{
69
70 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
71 ASPOSECPP_SHARED_RTTI_INFO_DECL();
72
73public:
74
77
78private:
81 friend class Runtime::DecimalFormatter;
82 friend class XsltOld::ApplyImportsAction;
83 friend class XsltOld::CompiledAction;
84 friend class XsltOld::ApplyTemplatesAction;
85 friend class XsltOld::ContainerAction;
86 friend class XsltOld::AttributeAction;
87 friend class XsltOld::AttributeSetAction;
88 friend class XsltOld::CallTemplateAction;
89 friend class XsltOld::ChooseAction;
90 friend class XsltOld::Compiler;
91 friend class XsltOld::Compiler;
92 friend class XsltOld::ElementAction;
93 friend class XsltOld::MessageAction;
94 friend class XsltOld::NewInstructionAction;
95 friend class XsltOld::NumberAction;
96 friend class XsltOld::RootAction;
97 friend class XsltOld::SortAction;
98 friend class XsltOld::TemplateAction;
99 friend class XsltOld::VariableAction;
100 friend class XsltOld::WithParamAction;
101 friend class XsltOld::InputScopeManager;
102 friend class XsltOld::PrefixQName;
103 friend class XsltOld::Processor;
104 friend class XsltOld::SequentialOutput;
105 friend class XsltOld::Stylesheet;
106 friend class XsltOld::XsltCompileContext;
107 friend class XsltOld::XsltCompileContext;
108 friend class XsltOld::XsltCompileContext;
109 friend class XsltOld::XsltOutput;
110 friend class System::ExceptionWrapperHelper;
111 template <typename T> friend class System::ExceptionWrapper;
113
114public:
115
118 virtual ASPOSECPP_SHARED_API String get_SourceUri();
121 virtual ASPOSECPP_SHARED_API int32_t get_LineNumber();
124 virtual ASPOSECPP_SHARED_API int32_t get_LinePosition();
127 ASPOSECPP_SHARED_API String get_Message() const override;
128
129protected:
130
132 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override;
133
135 ASPOSECPP_SHARED_API Details_XsltException();
136 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS());
137
140 ASPOSECPP_SHARED_API Details_XsltException(const String& message);
141 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS(String message));
142
146 ASPOSECPP_SHARED_API Details_XsltException(const String& message, Exception innerException);
147 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS(String message, Exception innerException));
148
150 static XsltException Create(const String& res, const ArrayPtr<String>& args);
151 static XsltException Create(const String& res, const ArrayPtr<String>& args, Exception inner);
152
153 Details_XsltException(const String& res, const ArrayPtr<String>& args, const String& sourceUri, int32_t lineNumber, int32_t linePosition, Exception inner);
154 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS(String res, ArrayPtr<String> args, String sourceUri, int32_t lineNumber, int32_t linePosition, Exception inner));
155
156 #ifdef ASPOSE_GET_SHARED_MEMBERS
157 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
158 #endif
160
161private:
162
163 String _res;
164 ArrayPtr<String> _args;
165 String _sourceUri;
166 int32_t _lineNumber;
167 int32_t _linePosition;
168 String _message;
169
170 static String CreateMessage(const String& res, const ArrayPtr<String>& args, const String& sourceUri, int32_t lineNumber, int32_t linePosition);
171 static String FormatMessage(const String& key, const ArrayPtr<String>& args);
172
173};
174
176class ASPOSECPP_SHARED_CLASS Details_XsltCompileException : public Details_XsltException
177{
180
181 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
182 ASPOSECPP_SHARED_RTTI_INFO_DECL();
183
184public:
185
188
189private:
191 friend class System::ExceptionWrapperHelper;
192 template <typename T> friend class System::ExceptionWrapper;
194
195protected:
196
198 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override;
199
201 ASPOSECPP_SHARED_API Details_XsltCompileException();
203
206 ASPOSECPP_SHARED_API Details_XsltCompileException(const String& message);
207 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(String message));
208
213 ASPOSECPP_SHARED_API Details_XsltCompileException(const String& message, Exception innerException);
214 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(String message, Exception innerException));
215
221 ASPOSECPP_SHARED_API Details_XsltCompileException(Exception inner, const String& sourceUri, int32_t lineNumber, int32_t linePosition);
222 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(Exception inner, String sourceUri, int32_t lineNumber, int32_t linePosition));
223
224};
225
226} // namespace Xsl
227} // namespace Xml
228} // namespace System
229
230
A base class for classes that represent system (rather than application) exceptions....
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
The exception that is thrown by the Load method when an error is found in the XSLT style sheet.
Definition: xslt_exception.h:177
Details_XsltCompileException(Exception inner, const String &sourceUri, int32_t lineNumber, int32_t linePosition)
Initializes a new instance of the XsltCompileException class.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(Exception inner, String sourceUri, int32_t lineNumber, int32_t linePosition))
Details_XsltCompileException()
Initializes a new instance of the XsltCompileException class.
void DoThrow(const System::ExceptionPtr &self) const override
Throws exception instance wrapped by exception wrapper.
Details_XsltCompileException(const String &message)
Initializes a new instance of the XsltCompileException class with a specified error message.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(String message))
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS(String message, Exception innerException))
Details_XsltCompileException(const String &message, Exception innerException)
Initializes a new instance of the XsltCompileException class specified error message and a reference ...
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltCompileException, CODEPORTING_ARGS())
The exception that is thrown when an error occurs while processing an XSLT transformation.
Definition: xslt_exception.h:66
Details_XsltException(const String &message, Exception innerException)
Initializes a new instance of the XsltException class.
void DoThrow(const System::ExceptionPtr &self) const override
Throws exception instance wrapped by exception wrapper.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS(String message, Exception innerException))
virtual int32_t get_LinePosition()
Returns the line position indicating where the error occurred in the style sheet.
virtual String get_SourceUri()
Returns the location path of the style sheet.
virtual int32_t get_LineNumber()
Returns the line number indicating where the error occurred in the style sheet.
Details_XsltException()
Initializes a new instance of the XsltException class.
String get_Message() const override
Returns the formatted error message describing the current exception.
Details_XsltException(const String &message)
Initializes a new instance of the XsltException class with a specified error message.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS())
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_XsltException, CODEPORTING_ARGS(String message))
@ Xml
Serialize according to the XML 1.0 rules.
Definition: db_command.h:9