Commit 0a40d841 authored by knowledge4igor's avatar knowledge4igor

Add printing file name and line number in TRY and TRY_RET macros for improving debugging info

parent bf80caf9
......@@ -30,6 +30,7 @@
} else { \
oss << strerror(errno); \
} \
oss << " (" << __FILE__ << ":" << __LINE__ << ")"; \
throw std::runtime_error(oss.str()); \
} \
} while (0)
......@@ -41,6 +42,7 @@
const char *str = #__VA_ARGS__; \
std::ostringstream oss; \
oss << str << ": " << strerror(errno); \
oss << " (" << __FILE__ << ":" << __LINE__ << ")"; \
throw std::runtime_error(oss.str()); \
} \
return ret; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment