CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_exception.h
1#pragma once
2
3#include <system/string.h>
4#include <system/nullable.h>
5#include <system/exceptions.h>
6#include <cstdint>
7
8namespace System
9{
10namespace Runtime
11{
12namespace Serialization
13{
14class SerializationInfo;
15class StreamingContext;
16} // namespace Serialization
17} // namespace Runtime
18namespace Text
19{
20namespace Json
21{
23namespace Serialization
24{
25template <typename> class JsonConverter;
26} // namespace Serialization
27class ThrowHelper;
28} // namespace Json
29} // namespace Text
30} // namespace System
31
32namespace System {
33
34namespace Text {
35
36namespace Json {
37
38class Details_JsonException;
40
41class ASPOSECPP_SHARED_CLASS Details_JsonException : public Details_Exception
42{
45
46 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
47 ASPOSECPP_SHARED_RTTI_INFO_DECL();
48
50 friend class ThrowHelper;
51 template<typename FT0> friend class System::Text::Json::Serialization::JsonConverter;
52 friend class System::ExceptionWrapperHelper;
53 template<typename T> friend class System::ExceptionWrapper;
54
55public:
56
57 ASPOSECPP_SHARED_API Nullable<int64_t> get_LineNumber();
59 ASPOSECPP_SHARED_API String get_Path();
60 ASPOSECPP_SHARED_API String get_Message() const override;
61
63
64protected:
65
67
69 void set_AppendPathInformation(bool value);
72 void set_Path(String value);
73
74 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override;
75
76 ASPOSECPP_SHARED_API Details_JsonException(String message, String path, Nullable<int64_t> lineNumber, Nullable<int64_t> bytePositionInLine, Exception innerException);
77
78 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message, String path, Nullable<int64_t> lineNumber, Nullable<int64_t> bytePositionInLine, Exception innerException));
79
80 ASPOSECPP_SHARED_API Details_JsonException(String message, String path, Nullable<int64_t> lineNumber, Nullable<int64_t> bytePositionInLine);
81
82 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message, String path, Nullable<int64_t> lineNumber, Nullable<int64_t> bytePositionInLine));
83
84 ASPOSECPP_SHARED_API Details_JsonException(String message, Exception innerException);
85
87
88 ASPOSECPP_SHARED_API Details_JsonException(String message);
89
90 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message));
91
92 ASPOSECPP_SHARED_API Details_JsonException();
93
94 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS());
95
97
99
100 void SetMessage(String message);
101 #ifdef ASPOSE_GET_SHARED_MEMBERS
102 void GetSharedMembers(System::Object::shared_members_type& result) const override;
103 #endif
104
105private:
106
107 bool pr_AppendPathInformation;
108 Nullable<int64_t> pr_LineNumber;
109 Nullable<int64_t> pr_BytePositionInLine;
110 String pr_Path;
111
112};
113
114} // namespace Json
115} // namespace Text
116} // namespace System
Represents an exception. Never create instances of this class manually. Use the Exception class inste...
Definition: exception.h:282
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:118
Dummy class to make StreamingContext-using translated classes compile. Do not manage instances of thi...
Definition: streaming_context.h:12
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:126
Definition: json_exception.h:42
Details_JsonException(String message, String path, Nullable< int64_t > lineNumber, Nullable< int64_t > bytePositionInLine)
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS())
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message))
void DoThrow(const System::ExceptionPtr &self) const override
Throws exception instance wrapped by exception wrapper.
void GetObjectData(System::SharedPtr< Runtime::Serialization::SerializationInfo > info, Runtime::Serialization::StreamingContext context)
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message, String path, Nullable< int64_t > lineNumber, Nullable< int64_t > bytePositionInLine))
Details_JsonException(System::SharedPtr< Runtime::Serialization::SerializationInfo > info, Runtime::Serialization::StreamingContext context)
Details_JsonException(String message, Exception innerException)
String _message
Definition: json_exception.h:66
Details_JsonException(String message, String path, Nullable< int64_t > lineNumber, Nullable< int64_t > bytePositionInLine, Exception innerException)
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(System::SharedPtr< Runtime::Serialization::SerializationInfo > info, Runtime::Serialization::StreamingContext context))
void set_BytePositionInLine(Nullable< int64_t > value)
String get_Message() const override
Returns the string containing the error destcription.
void set_LineNumber(Nullable< int64_t > value)
Nullable< int64_t > get_BytePositionInLine()
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message, Exception innerException))
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Details_JsonException, CODEPORTING_ARGS(String message, String path, Nullable< int64_t > lineNumber, Nullable< int64_t > bytePositionInLine, Exception innerException))
Definition: json_reader_exception.h:31
Definition: json_converter_of_t.h:80
Definition: throw_helper.h:91
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9