From 7cf3a1af26b820cfe23b0adea5c194775ac4602b Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Thu, 3 Oct 2024 21:47:33 +0200 Subject: [PATCH] Add h_result messages --- src/xtd.core/include/xtd/h_result.h | 124 +++++++++++++-------------- src/xtd.core/src/xtd/h_result.cpp | 125 ++++++++++++++-------------- 2 files changed, 124 insertions(+), 125 deletions(-) diff --git a/src/xtd.core/include/xtd/h_result.h b/src/xtd.core/include/xtd/h_result.h index 30a3ae54951..6365a6a3446 100644 --- a/src/xtd.core/include/xtd/h_result.h +++ b/src/xtd.core/include/xtd/h_result.h @@ -138,135 +138,135 @@ namespace xtd { static constexpr int32 COR_E_DIVIDEBYZERO = static_cast(0x80020012); // Duplicate with DISP_E_DIVBYZERO /// @brief Dll was not found. static constexpr int32 COR_E_DLLNOTFOUND = static_cast(0x80131524); - /// @brief + /// @brief Duplicate objects in argument. static constexpr int32 COR_E_DUPLICATEWAITOBJECT = static_cast(0x80131529); - /// @brief + /// @brief Attempted to read past the end of the stream. static constexpr int32 COR_E_ENDOFSTREAM = static_cast(0x80070026); - /// @brief + /// @brief Entry point was not found. static constexpr int32 COR_E_ENTRYPOINTNOTFOUND = static_cast(0x80131523); /// @brief Exception of type 'xtd::exception' was thrown. static constexpr int32 COR_E_EXCEPTION = static_cast(0x80131500); - /// @brief + /// @brief Internal error in the runtime. static constexpr int32 COR_E_EXECUTIONENGINE = static_cast(0x80131506); - /// @brief + /// @brief Fail fast. static constexpr int32 COR_E_FAILFAST = static_cast(0x80131623); - /// @brief + /// @brief Attempted to access a field that is not accessible by the caller. static constexpr int32 COR_E_FIELDACCESS = static_cast(0x80131507); - /// @brief + /// @brief Could not load the specified file. static constexpr int32 COR_E_FILELOAD = static_cast(0x80131621); - /// @brief + /// @brief Unable to find the specified file. static constexpr int32 COR_E_FILENOTFOUND = static_cast(0x80070002); // Duplicate with E_FILENOTFOUND - /// @brief + /// @brief One of the identified items was in an invalid format. static constexpr int32 COR_E_FORMAT = static_cast(0x80131537); - /// @brief + /// @brief Index was outside the bounds of the array. static constexpr int32 COR_E_INDEXOUTOFRANGE = static_cast(0x80131508); - /// @brief + /// @brief Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space. static constexpr int32 COR_E_INSUFFICIENTEXECUTIONSTACK = static_cast(0x80131578); - /// @brief + /// @brief Insufficient memory to continue the execution of the program. static constexpr int32 COR_E_INSUFFICIENTMEMORY = static_cast(0x8013153D); - /// @brief + /// @brief Specified cast is not valid. static constexpr int32 COR_E_INVALIDCAST = static_cast(0x80004002); - /// @brief + /// @brief Attempt has been made to use a COM object that does not have a backing class factory. static constexpr int32 COR_E_INVALIDCOMOBJECT = static_cast(0x80131527); - /// @brief + /// @brief Specified filter criteria was invalid. static constexpr int32 COR_E_INVALIDFILTERCRITERIA = static_cast(0x80131601); - /// @brief + /// @brief Specified OLE variant was invalid. static constexpr int32 COR_E_INVALIDOLEVARIANTTYPE = static_cast(0x80131531); - /// @brief + /// @brief Operation is not valid due to the current state of the object. static constexpr int32 COR_E_INVALIDOPERATION = static_cast(0x80131509); - /// @brief + /// @brief xtd detected an invalid program. static constexpr int32 COR_E_INVALIDPROGRAM = static_cast(0x8013153A); - /// @brief + /// @brief I/O error occurred. static constexpr int32 COR_E_IO = static_cast(0x80131620); - /// @brief + /// @brief The given key was not present in the dictionary. static constexpr int32 COR_E_KEYNOTFOUND = static_cast(0x80131577); - /// @brief + /// @brief Marshaling directives are invalid. static constexpr int32 COR_E_MARSHALDIRECTIVE = static_cast(0x80131535); - /// @brief + /// @brief Cannot access member. static constexpr int32 COR_E_MEMBERACCESS = static_cast(0x8013151A); - /// @brief + /// @brief Attempt to access the method failed. static constexpr int32 COR_E_METHODACCESS = static_cast(0x80131510); - /// @brief + /// @brief Attempted to access a non-existing field. static constexpr int32 COR_E_MISSINGFIELD = static_cast(0x80131511); - /// @brief + /// @brief Attempted to access a missing manifest resource. static constexpr int32 COR_E_MISSINGMANIFESTRESOURCE = static_cast(0x80131532); - /// @brief + /// @brief Attempted to access a missing member. static constexpr int32 COR_E_MISSINGMEMBER = static_cast(0x80131512); - /// @brief + /// @brief Attempted to access a missing method. static constexpr int32 COR_E_MISSINGMETHOD = static_cast(0x80131513); - /// @brief + /// @brief Resource lookup fell back to the ultimate fallback resources in a satellite assembly, but that satellite either was not found or could not be loaded. Please consider reinstalling or repairing the application. static constexpr int32 COR_E_MISSINGSATELLITEASSEMBLY = static_cast(0x80131536); - /// @brief + /// @brief Attempted to add multiple callbacks to a delegate that does not support multicast. static constexpr int32 COR_E_MULTICASTNOTSUPPORTED = static_cast(0x80131514); - /// @brief + /// @brief Number encountered was not a finite quantity. static constexpr int32 COR_E_NOTFINITENUMBER = static_cast(0x80131528); - /// @brief + /// @brief Specified method is not supported. static constexpr int32 COR_E_NOTSUPPORTED = static_cast(0x80131515); /// @brief Cannot access a closed object. static constexpr int32 COR_E_OBJECTCLOSED = static_cast(0x80131622); - /// @brief + /// @brief The operation was canceled. static constexpr int32 COR_E_OPERATIONCANCELED = static_cast(0x8013153B); - /// @brief + /// @brief Insufficient memory to continue the execution of the program. static constexpr int32 COR_E_OUTOFMEMORY = static_cast(0x8007000E); - /// @brief + /// @brief Arithmetic operation resulted in an overflow. static constexpr int32 COR_E_OVERFLOW = static_cast(0x80131516); - /// @brief + /// @brief The specified file name or path is too long, or a component of the specified path is too long. static constexpr int32 COR_E_PATHTOOLONG = static_cast(0x800700CE); - /// @brief + /// @brief Operation is not supported on this platform. static constexpr int32 COR_E_PLATFORMNOTSUPPORTED = static_cast(0x80131539); /// @brief Attempted to operate on an array with the incorrect number of dimensions. static constexpr int32 COR_E_RANK = static_cast(0x80131517); - /// @brief + /// @brief Exception of type 'xtd::reflection::reflection_type_load_exception' was thrown. static constexpr int32 COR_E_REFLECTIONTYPELOAD = static_cast(0x80131602); - /// @brief + /// @brief An object that does not derive from xtd:oobject has been wrapped in a runtime_wrapped_exception. static constexpr int32 COR_E_RUNTIMEWRAPPED = static_cast(0x8013153E); - /// @brief + /// @brief Specified array was not of the expected rank. static constexpr int32 COR_E_SAFEARRAYRANKMISMATCH = static_cast(0x80131538); - /// @brief + /// @brief Specified array was not of the expected type. static constexpr int32 COR_E_SAFEARRAYTYPEMISMATCH = static_cast(0x80131533); - /// @brief + /// @brief Security error. static constexpr int32 COR_E_SECURITY = static_cast(0x8013150A); - /// @brief + /// @brief Serialization error. static constexpr int32 COR_E_SERIALIZATION = static_cast(0x8013150C); - /// @brief + /// @brief Operation caused a stack overflow. static constexpr int32 COR_E_STACKOVERFLOW = static_cast(0x800703E9); - /// @brief + /// @brief Object synchronization method was called from an unsynchronized block of code. static constexpr int32 COR_E_SYNCHRONIZATIONLOCK = static_cast(0x80131518); /// @brief System error. static constexpr int32 COR_E_SYSTEM = static_cast(0x80131501); - /// @brief + /// @brief Exception of type 'xtd::reflection::target_exception' was thrown. static constexpr int32 COR_E_TARGET = static_cast(0x80131603); - /// @brief + /// @brief Exception has been thrown by the target of an invocation. static constexpr int32 COR_E_TARGETINVOCATION = static_cast(0x80131604); - /// @brief + /// @brief Number of parameters specified does not match the expected number. static constexpr int32 COR_E_TARGETPARAMCOUNT = static_cast(0x8002000E); - /// @brief + /// @brief Thread was aborted. static constexpr int32 COR_E_THREADABORTED = static_cast(0x80131530); - /// @brief + /// @brief Thread was interrupted from a waiting state. static constexpr int32 COR_E_THREADINTERRUPTED = static_cast(0x80131519); - /// @brief + /// @brief Thread start failure. static constexpr int32 COR_E_THREADSTART = static_cast(0x80131525); - /// @brief + /// @brief Thread was in an invalid state for the operation being executed. static constexpr int32 COR_E_THREADSTATE = static_cast(0x80131520); - /// @brief + /// @brief The operation has timed out. static constexpr int32 COR_E_TIMEOUT = static_cast(0x80131505); - /// @brief + /// @brief Attempt to access the type failed. static constexpr int32 COR_E_TYPEACCESS = static_cast(0x80131543); - /// @brief + /// @brief The type initializer for 'value' threw an exception. static constexpr int32 COR_E_TYPEINITIALIZATION = static_cast(0x80131534); - /// @brief + /// @brief Failure has occurred while loading a type. static constexpr int32 COR_E_TYPELOAD = static_cast(0x80131522); - /// @brief + /// @brief Type had been unloaded. static constexpr int32 COR_E_TYPEUNLOADED = static_cast(0x80131013); - /// @brief + /// @brief Attempted to perform an unauthorized operation. static constexpr int32 COR_E_UNAUTHORIZEDACCESS = static_cast(0x80070005); - /// @brief + /// @brief Operation could destabilize the runtime. static constexpr int32 COR_E_VERIFICATION = static_cast(0x8013150D); - /// @brief + /// @brief No handle of the given name exists. static constexpr int32 COR_E_WAITHANDLECANNOTBEOPENED = static_cast(0x8013152C); - /// @brief + /// @brief Not initialized static constexpr int32 CO_E_NOTINITIALIZED = static_cast(0x800401F0); - /// @brief + /// @brief Could not find the parameter. static constexpr int32 DISP_E_PARAMNOTFOUND = static_cast(0x80020004); /// @brief static constexpr int32 DISP_E_TYPEMISMATCH = static_cast(0x80020005); @@ -282,7 +282,7 @@ namespace xtd { static constexpr int32 E_BOUNDS = static_cast(0x8000000B); /// @brief static constexpr int32 E_CHANGED_STATE = static_cast(0x8000000C); - /// @brief + /// @brief Unable to find the specified file. static constexpr int32 E_FILENOTFOUND = static_cast(0x80070002); // Duplicate with COR_E_FILENOTFOUND /// @brief Unspecified failure. static constexpr int32 E_FAIL = static_cast(0x80004005); diff --git a/src/xtd.core/src/xtd/h_result.cpp b/src/xtd.core/src/xtd/h_result.cpp index f81675bc99c..56c7559abac 100644 --- a/src/xtd.core/src/xtd/h_result.cpp +++ b/src/xtd.core/src/xtd/h_result.cpp @@ -188,72 +188,71 @@ const std::unordered_map& h_result::get_messages() noexcept { {COR_E_DIRECTORYNOTFOUND, "Attempted to access a path that is not on the disk."_t}, {COR_E_DIVIDEBYZERO, "Attempted to divide by zero."_t}, {COR_E_DLLNOTFOUND, "Dll was not found."_t}, - {COR_E_DUPLICATEWAITOBJECT, ""_t}, - {COR_E_ENDOFSTREAM, ""_t}, - {COR_E_ENTRYPOINTNOTFOUND, ""_t}, + {COR_E_DUPLICATEWAITOBJECT, "Duplicate objects in argument."_t}, + {COR_E_ENDOFSTREAM, "Attempted to read past the end of the stream."_t}, + {COR_E_ENTRYPOINTNOTFOUND, "Entry point was not found."_t}, {COR_E_EXCEPTION, "Exception of type 'xtd::exception' was thrown."_t}, - {COR_E_EXECUTIONENGINE, ""_t}, - {COR_E_FAILFAST, ""_t}, - {COR_E_FIELDACCESS, ""_t}, - {COR_E_FILELOAD, ""_t}, - {COR_E_FILENOTFOUND, ""_t}, - {COR_E_FORMAT, ""_t}, - {COR_E_INDEXOUTOFRANGE, ""_t}, - {COR_E_INSUFFICIENTEXECUTIONSTACK, ""_t}, - {COR_E_INSUFFICIENTMEMORY, ""_t}, - {COR_E_INVALIDCAST, ""_t}, - {COR_E_INVALIDCOMOBJECT, ""_t}, - {COR_E_INVALIDFILTERCRITERIA, ""_t}, - {COR_E_INVALIDOLEVARIANTTYPE, ""_t}, - {COR_E_INVALIDOPERATION, ""_t}, - {COR_E_INVALIDPROGRAM, ""_t}, - {COR_E_IO, ""_t}, - {COR_E_KEYNOTFOUND, ""_t}, - {COR_E_MARSHALDIRECTIVE, ""_t}, - {COR_E_MEMBERACCESS, ""_t}, - {COR_E_METHODACCESS, ""_t}, - {COR_E_MISSINGFIELD, ""_t}, - {COR_E_MISSINGMANIFESTRESOURCE, ""_t}, - {COR_E_MISSINGMEMBER, ""_t}, - {COR_E_MISSINGMETHOD, ""_t}, - {COR_E_MISSINGSATELLITEASSEMBLY, ""_t}, - {COR_E_MULTICASTNOTSUPPORTED, ""_t}, - {COR_E_NOTFINITENUMBER, ""_t}, - {COR_E_NOTSUPPORTED, ""_t}, + {COR_E_EXECUTIONENGINE, "Internal error in the runtime."_t}, + {COR_E_FAILFAST, "Fail fast."_t}, + {COR_E_FIELDACCESS, "Attempted to access a field that is not accessible by the caller."_t}, + {COR_E_FILELOAD, "Could not load the specified file."_t}, + {COR_E_FILENOTFOUND, "Unable to find the specified file."_t}, + {COR_E_FORMAT, "One of the identified items was in an invalid format."_t}, + {COR_E_INDEXOUTOFRANGE, "Index was outside the bounds of the array."_t}, + {COR_E_INSUFFICIENTEXECUTIONSTACK, "Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space."_t}, + {COR_E_INSUFFICIENTMEMORY, "Insufficient memory to continue the execution of the program."_t}, + {COR_E_INVALIDCAST, "Specified cast is not valid."_t}, + {COR_E_INVALIDCOMOBJECT, "Attempt has been made to use a COM object that does not have a backing class factory."_t}, + {COR_E_INVALIDFILTERCRITERIA, "Specified filter criteria was invalid."_t}, + {COR_E_INVALIDOLEVARIANTTYPE, "Specified OLE variant was invalid."_t}, + {COR_E_INVALIDOPERATION, "Operation is not valid due to the current state of the object."_t}, + {COR_E_INVALIDPROGRAM, "xtd detected an invalid program."_t}, + {COR_E_IO, "I/O error occurred."_t}, + {COR_E_KEYNOTFOUND, "The given key was not present in the dictionary."_t}, + {COR_E_MARSHALDIRECTIVE, "Marshaling directives are invalid."_t}, + {COR_E_MEMBERACCESS, "Cannot access member."_t}, + {COR_E_METHODACCESS, "Attempt to access the method failed."_t}, + {COR_E_MISSINGFIELD, "Attempted to access a non-existing field."_t}, + {COR_E_MISSINGMANIFESTRESOURCE, "Attempted to access a missing manifest resource."_t}, + {COR_E_MISSINGMEMBER, "Attempted to access a missing member."_t}, + {COR_E_MISSINGMETHOD, "Attempted to access a missing method."_t}, + {COR_E_MISSINGSATELLITEASSEMBLY, "Resource lookup fell back to the ultimate fallback resources in a satellite assembly, but that satellite either was not found or could not be loaded. Please consider reinstalling or repairing the application."_t}, + {COR_E_MULTICASTNOTSUPPORTED, "Attempted to add multiple callbacks to a delegate that does not support multicast."_t}, + {COR_E_NOTFINITENUMBER, "Number encountered was not a finite quantity."_t}, + {COR_E_NOTSUPPORTED, "Specified method is not supported."_t}, {COR_E_OBJECTCLOSED, "Cannot access a closed object."_t}, - {COR_E_OPERATIONCANCELED, ""_t}, - {COR_E_OUTOFMEMORY, ""_t}, - {COR_E_OVERFLOW, ""_t}, - {COR_E_PATHTOOLONG, ""_t}, - {COR_E_PLATFORMNOTSUPPORTED, ""_t}, + {COR_E_OPERATIONCANCELED, "The operation was canceled."_t}, + {COR_E_OUTOFMEMORY, "Insufficient memory to continue the execution of the program."_t}, + {COR_E_OVERFLOW, "Arithmetic operation resulted in an overflow."_t}, + {COR_E_PATHTOOLONG, "The specified file name or path is too long, or a component of the specified path is too long."_t}, + {COR_E_PLATFORMNOTSUPPORTED, "Operation is not supported on this platform."_t}, {COR_E_RANK, "Attempted to operate on an array with the incorrect number of dimensions."_t}, - {COR_E_REFLECTIONTYPELOAD, ""_t}, - {COR_E_RUNTIMEWRAPPED, ""_t}, - {COR_E_SAFEARRAYRANKMISMATCH, ""_t}, - {COR_E_SAFEARRAYTYPEMISMATCH, ""_t}, - {COR_E_SECURITY, ""_t}, - {COR_E_SERIALIZATION, ""_t}, - {COR_E_STACKOVERFLOW, ""_t}, - {COR_E_SYNCHRONIZATIONLOCK, ""_t}, + {COR_E_REFLECTIONTYPELOAD, "Exception of type 'xtd::reflection::reflection_type_load_exception' was thrown."_t}, + {COR_E_RUNTIMEWRAPPED, "An object that does not derive from xtd:oobject has been wrapped in a runtime_wrapped_exception."_t}, + {COR_E_SAFEARRAYRANKMISMATCH, "Specified array was not of the expected rank."_t}, + {COR_E_SAFEARRAYTYPEMISMATCH, "Specified array was not of the expected type."_t}, + {COR_E_SECURITY, "Security error."_t}, + {COR_E_SERIALIZATION, "Serialization error."_t}, + {COR_E_STACKOVERFLOW, "Operation caused a stack overflow."_t}, + {COR_E_SYNCHRONIZATIONLOCK, "Object synchronization method was called from an unsynchronized block of code."_t}, {COR_E_SYSTEM, "System error."_t}, - {COR_E_TARGET, ""_t}, - {COR_E_TARGETINVOCATION, ""_t}, - {COR_E_TARGETPARAMCOUNT, ""_t}, - {COR_E_THREADABORTED, ""_t}, - {COR_E_THREADINTERRUPTED, ""_t}, - {COR_E_THREADSTART, ""_t}, - {COR_E_THREADSTATE, ""_t}, - {COR_E_TIMEOUT, ""_t}, - {COR_E_TYPEACCESS, ""_t}, - {COR_E_TYPEINITIALIZATION, ""_t}, - {COR_E_TYPELOAD, ""_t}, - {COR_E_TYPEUNLOADED, ""_t}, - {COR_E_UNAUTHORIZEDACCESS, ""_t}, - {COR_E_VERIFICATION, ""_t}, - {COR_E_WAITHANDLECANNOTBEOPENED, ""_t}, - {CO_E_NOTINITIALIZED, ""_t}, - {CO_E_NOTINITIALIZED, ""_t}, - {DISP_E_PARAMNOTFOUND, ""_t}, + {COR_E_TARGET, "Exception of type 'xtd::reflection::target_exception' was thrown."_t}, + {COR_E_TARGETINVOCATION, "Exception has been thrown by the target of an invocation."_t}, + {COR_E_TARGETPARAMCOUNT, "Number of parameters specified does not match the expected number."_t}, + {COR_E_THREADABORTED, "Thread was aborted."_t}, + {COR_E_THREADINTERRUPTED, "Thread was interrupted from a waiting state."_t}, + {COR_E_THREADSTART, "Thread start failure."_t}, + {COR_E_THREADSTATE, "Thread was in an invalid state for the operation being executed."_t}, + {COR_E_TIMEOUT, "The operation has timed out."_t}, + {COR_E_TYPEACCESS, "Attempt to access the type failed."_t}, + {COR_E_TYPEINITIALIZATION, "The type initializer for 'value' threw an exception."_t}, + {COR_E_TYPELOAD, "Failure has occurred while loading a type."_t}, + {COR_E_TYPEUNLOADED, "Type had been unloaded."_t}, + {COR_E_UNAUTHORIZEDACCESS, "Attempted to perform an unauthorized operation."_t}, + {COR_E_VERIFICATION, "Operation could destabilize the runtime."_t}, + {COR_E_WAITHANDLECANNOTBEOPENED, "No handle of the given name exists."_t}, + {CO_E_NOTINITIALIZED, "Not initialized"_t}, + {DISP_E_PARAMNOTFOUND, "Could not find the parameter."_t}, {DISP_E_TYPEMISMATCH, ""_t}, {DISP_E_BADVARTYPE, ""_t}, {DISP_E_OVERFLOW, ""_t}, @@ -261,7 +260,7 @@ const std::unordered_map& h_result::get_messages() noexcept { {E_ABORT, "Operation aborted."_t}, {E_BOUNDS, ""_t}, {E_CHANGED_STATE, ""_t}, - {E_FILENOTFOUND, ""_t}, + {E_FILENOTFOUND, "Unable to find the specified file."_t}, {E_FAIL, "Unspecified failure."_t}, {E_HANDLE, ""_t}, {E_INVALIDARG, ""_t},