8 static inline std::stringstream
_fmt_msg(const std::string
&msg
, const std::string
&file
,
11 ss
<< msg
<< " (" << file
<< ":" << line
<< ")";
15 static inline std::stringstream
_fmt_errno(const std::string
&msg
, unsigned saved_errno
,
16 const std::string
&file
, unsigned line
) {
17 return _fmt_msg(msg
+ ": " + strerror(saved_errno
), file
, line
);
20 #define fmt_msg(msg) _fmt_msg(msg, __FILE__, __LINE__).str()
21 #define fmt_errno(msg) _fmt_errno(msg, errno, __FILE__, __LINE__).str()