Change-Id: I02258f8b372610c03cced417a63163c07c251e5c
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
}
}
+std::string GetErrorString(int error_code) {
+ static const size_t kSize = 1024;
+ char msg[kSize] = {0};
+ strerror_r(error_code, msg, kSize);
+ return msg;
+}
+
} // namespace tools
} // namespace common
} \
} while (0)
+/**
+ * @brief Safe wrapper of strerror() function.
+ *
+ * @param[in] error_code - error code to be passed to strerror()
+ *
+ * @return string representation of error_code
+ */
+std::string GetErrorString(int error_code);
+
} // namespace tools
} // namespace common