Hi Geoff,
 
If I’m not mistaken, std:Confused smileystem_error was derived from Boost.
 
This being the case, you create an exception like this:
 
    #include <system_error>
    .
    .
    .
    throw system_error(errno, system_category(), “whatever message”);
 
AFAIK, you can also use generic_category() is you are dealing with POSIX error codes.
 
I hope this helps.
 
Regards,
Leo