chsvlib
chsv helper source code

◆ PlatformException() [9/9]

PlatformException ( const std::system_error &  sys_err)
noexcept

Constructs an exception object and generates a description, retrieving information from the [std::system_error] object.

Parameters
[in]sys_erris a reference to the system_error object, from which the information about the platform error is retrieved. The platform code is read from the return value of the system_error_code_value method. The platform description is read from the string returned by the system_error_code_message method.

The function constructs an exception associated with an error code held by the system_error exception.

The descriptions returned by the Exception::What() "What" function or by the Exception::what() "what" function are defined according to the following format: "System error exception. Error code: \<PLATFORM_CODE\>. System message: \<PLATFORM_DESCRIPTION\>. Error category: \<CATEGORY\>", where <PLATFORM_CODE> is replaced by a string representation of the value returned by the system_error_code_value method; <PLATFORM_DESCRIPTION> is replaced by the string returned by the system_error_code_message method; and <CATEGORY> is replaces by a name of the category of the error, which is retrieved from an internal call to the system_error_code_category_name method.