⚗️ try minimal example
This commit is contained in:
parent
0d530c9de8
commit
edc203a837
@ -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
|
|||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user