CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
external_exception.h
1
2
3#pragma once
4
5#include "system/details_exception_with_error_code.h"
6
7namespace System { namespace Runtime { namespace InteropServices {
8
12class ASPOSECPP_SHARED_CLASS Details_ExternalException : public Details_ExceptionWithErrorCode<Details_SystemException>
13{
14 friend class System::ExceptionWrapperHelper;
15 template <typename T> friend class System::ExceptionWrapper;
17 RTTI_INFO_NAMED(System::Runtime::InteropServices::Details_ExternalException, "System::Runtime::ExternalException",
18 ::System::BaseTypesInfo<System::Object>);
19
20protected:
22 ASPOSECPP_SHARED_API Details_ExternalException();
23 MEMBER_FUNCTION_MAKE_OBJECT(Details_ExternalException, CODEPORTING_ARGS(), CODEPORTING_ARGS());
26 ASPOSECPP_SHARED_API Details_ExternalException(const String& message);
27 MEMBER_FUNCTION_MAKE_OBJECT(Details_ExternalException, CODEPORTING_ARGS(const String& message), CODEPORTING_ARGS(message));
33 ASPOSECPP_SHARED_API Details_ExternalException(const String& message, const System::Exception& innerException);
34 MEMBER_FUNCTION_MAKE_OBJECT(Details_ExternalException, CODEPORTING_ARGS(const String& message, const System::Exception& innerException), CODEPORTING_ARGS(message, innerException));
39 ASPOSECPP_SHARED_API Details_ExternalException(const String& message, int32_t errorCode);
40 MEMBER_FUNCTION_MAKE_OBJECT(Details_ExternalException, CODEPORTING_ARGS(const String& message, int32_t errorCode), CODEPORTING_ARGS(message, errorCode));
42 [[noreturn]] void DoThrow(const System::ExceptionPtr& self) const override;
43
44private:
46 static const String s_default_message;
50 static const String& DefaultMessageIfNull(const String& message);
51};
52
54}}} // namespace System::Runtime::InteropServices
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
The base exception type for all COM interop exceptions and structured exception handling (SEH) except...
Definition: external_exception.h:13
Details_ExternalException(const String &message, int32_t errorCode)
Initializes a new instance of the ExternalException class with a specified error message and the HRES...
Details_ExternalException(const String &message)
Initializes a new instance of the ExternalException class with a specified error message.
Details_ExternalException()
Initializes a new instance of the ExternalException class with default properties.
void DoThrow(const System::ExceptionPtr &self) const override
Details_ExternalException(const String &message, const System::Exception &innerException)
Initializes a new instance of the ExternalException class with a specified error message and a refere...
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