CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
win_32_exception.h
1
2
3#pragma once
4
5#include "system/details_exception_with_error_code.h"
6
7namespace System { namespace ComponentModel {
8
12class ASPOSECPP_SHARED_CLASS Details_Win32Exception : public Details_ExceptionWithErrorCode<Details_SystemException>
13{
14 friend class System::ExceptionWrapperHelper;
15 template <typename T> friend class System::ExceptionWrapper;
17 RTTI_INFO_NAMED(System::ComponentModel::Details_Win32Exception, "System::ComponentModel::Win32Exception",
18 System::BaseTypesInfo<System::Object>);
20 int32_t m_nativeErrorCode;
21
22protected:
24 ASPOSECPP_SHARED_API Details_Win32Exception();
25 MEMBER_FUNCTION_MAKE_OBJECT(Details_Win32Exception, CODEPORTING_ARGS(), CODEPORTING_ARGS());
28 ASPOSECPP_SHARED_API Details_Win32Exception(int32_t error);
29 MEMBER_FUNCTION_MAKE_OBJECT(Details_Win32Exception, CODEPORTING_ARGS(int32_t error), CODEPORTING_ARGS(error));
32 ASPOSECPP_SHARED_API Details_Win32Exception(const String& message);
33 MEMBER_FUNCTION_MAKE_OBJECT(Details_Win32Exception, CODEPORTING_ARGS(const String& message), CODEPORTING_ARGS(message));
38 ASPOSECPP_SHARED_API Details_Win32Exception(int32_t error, const String& message);
39 MEMBER_FUNCTION_MAKE_OBJECT(Details_Win32Exception, CODEPORTING_ARGS(int32_t error, const String& message), CODEPORTING_ARGS(error, message));
44 ASPOSECPP_SHARED_API Details_Win32Exception(const String& message, const System::Exception& innerException);
45 MEMBER_FUNCTION_MAKE_OBJECT(Details_Win32Exception, CODEPORTING_ARGS(const String& message, const System::Exception& innerException), CODEPORTING_ARGS(message, innerException));
47 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override;
49 virtual ASPOSECPP_SHARED_API String ExtraDescription() const override;
50
51public:
53 virtual ASPOSECPP_SHARED_API int32_t get_NativeErrorCode() const;
54};
55
57
58}} // namespace System::ComponentModel
Throws an exception for a Win32 error code. Never create instances of this class manually....
Definition: win_32_exception.h:13
void DoThrow(const System::ExceptionPtr &self) const override
virtual String ExtraDescription() const override
Details_Win32Exception()
Initializes a new instance of the Win32Exception class with the last Win32 error that occurred.
Details_Win32Exception(const String &message, const System::Exception &innerException)
Initializes a new instance of the Win32Exception class with the specified detailed description and th...
Details_Win32Exception(const String &message)
Initializes a new instance of the Win32Exception class with the specified detailed description.
Details_Win32Exception(int32_t error)
Initializes a new instance of the Win32Exception class with the specified error.
Details_Win32Exception(int32_t error, const String &message)
Initializes a new instance of the Win32Exception class with the specified error and the specified det...
virtual int32_t get_NativeErrorCode() const
Gets the Win32 error code associated with this exception.
The template class for an exception with an error code.
Definition: details_exception_with_error_code.h:13
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
Definition: db_command.h:9