Commit 1c89ff5d authored by Teng Qin's avatar Teng Qin

Add helper method to exception.h

parent ad415d2f
......@@ -37,6 +37,12 @@ static inline std::tuple<int, std::string> mkstatus(int ret, const char *msg) {
return std::make_tuple(ret, std::string(msg));
}
static inline std::tuple<int, std::string> mkstatus(
int ret, const std::string& msg
) {
return std::make_tuple(ret, msg);
}
static inline std::tuple<int, std::string> mkstatus(int ret) {
return std::make_tuple(ret, std::string());
}
......
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