Commit da5277a5 authored by Matthieu Dorier's avatar Matthieu Dorier

debugged client c++ api

parent f8d4e2f8
This diff is collapsed.
#ifndef __SDSKV_COMMON_HPP
#define __SDSKV_COMMON_HPP
#include <sdskv-common.h>
namespace sdskv {
const char const sdskv_error_messages[] = {
const char* const sdskv_error_messages[] = {
"",
"Allocation error",
"Invalid argument",
......@@ -28,15 +30,13 @@ class exception : public std::exception {
std::string m_msg;
int m_error;
static const
public:
exception(int error)
: m_msg(std::string("[SDSKV] ") + sdskv_error_messages[-error])
, m_error(error) {}
const char* what() const {
virtual const char* what() const noexcept override {
return m_msg.c_str();
}
......
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