First of all, your code has an error, for example, you cannot write this:
e << boost::errinfo_api_function("fopen")
Because it errinfo_api_functioncan only be used with int. So do something like this:
e << boost::errinfo_api_function(100) //say 100 is error code for api error
. errinfo_api_function 1 it int. , . , , !
< > 1. , , int, , const char*. 1.40.0 errinfo_api_function 1.45.0 errinfo_api_function. dalle, .: -) >
get_error_info boost::exception.
, boost:: exception,
boost:: , get_error_info.
:
std::string fileError = get_error_info<errinfo_file_name>(e);
int errno = get_error_info<errinfo_errno>(e);
std::string mode = get_error_info<errinfo_file_open_mode>(e);
int apiError = get_error_info<errinfo_api_function>(e);
: