try minimal example

parent 0d530c9d
...@@ -76,11 +76,6 @@ class exception : public std::exception ...@@ -76,11 +76,6 @@ class exception : public std::exception
protected: protected:
exception(const char* what_arg) : m(what_arg) {} exception(const char* what_arg) : m(what_arg) {}
static std::string name(const std::string& ename)
{
return "[json.exception." + ename + "] ";
}
private: private:
std::runtime_error m; std::runtime_error m;
}; };
...@@ -90,14 +85,12 @@ class parse_error : public exception ...@@ -90,14 +85,12 @@ class parse_error : public exception
public: public:
static parse_error create(const std::string& what_arg) static parse_error create(const std::string& what_arg)
{ {
std::string w = exception::name("parse_error") + what_arg; std::string w = "[json.exception.parse_error] " + what_arg;
return parse_error(w.c_str()); return parse_error(w.c_str());
} }
private: private:
parse_error(const char* what_arg) parse_error(const char* what_arg) : exception(what_arg) {}
: exception(what_arg)
{}
}; };
} // namespace detail2 } // namespace detail2
......
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