5#include "system/convert.h"
6#include "system/exceptions.h"
11template <typename T, typename = std::enable_if<std::is_base_of<Exception, T>::value>>
15 static const int32_t DEFAULT_HRESULT = -2147467259;
21 T::m_HResult = DEFAULT_HRESULT;
27 T::m_HResult = DEFAULT_HRESULT;
35 : T(message, innerException)
37 T::m_HResult = DEFAULT_HRESULT;
45 T::m_HResult = errorCode;
62 return T::m_message ==
nullptr ? T::DefaultMessage() : T::m_message;
The template class for an exception with an error code.
Definition: details_exception_with_error_code.h:13
virtual String get_Message() const override
Definition: details_exception_with_error_code.h:60
virtual int32_t get_ErrorCode() const
Gets the HRESULT of the error.
Definition: details_exception_with_error_code.h:55
Details_ExceptionWithErrorCode(const String &message, const System::Exception &innerException)
Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and a r...
Definition: details_exception_with_error_code.h:34
Details_ExceptionWithErrorCode(const String &message)
Initializes a new instance of the ExceptionWithErrorCode class with a specified error message.
Definition: details_exception_with_error_code.h:25
Details_ExceptionWithErrorCode()
Initializes a new instance of the ExceptionWithErrorCode class with default properties.
Definition: details_exception_with_error_code.h:19
virtual String ExtraDescription() const override
Definition: details_exception_with_error_code.h:48
Details_ExceptionWithErrorCode(const String &message, int32_t errorCode)
Initializes a new instance of the ExceptionWithErrorCode class with a specified error message and the...
Definition: details_exception_with_error_code.h:43
Template that represents wrapper of exceptions that are derived from Exception class.
Definition: exception.h:113
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
static String ToString(int8_t value)
Converts the specified value to its string representation.