Commit ee75cfc0 authored by Yuri Dyachenko's avatar Yuri Dyachenko

make libconfig exceptions public

it's allow to generate libconfig exception in user code
example:
libconfig::Setting& obj = ...;
if ( !obj.isGroup() )
    throw libconfig::SettingTypeException( obj, "TypeGroup expected" );
parent c2e588c9
......@@ -54,8 +54,6 @@ class Setting; // fwd decl
class LIBCONFIGXX_API SettingException : public ConfigException
{
friend class Config;
public:
SettingException(const SettingException &other);
......@@ -67,8 +65,6 @@ class LIBCONFIGXX_API SettingException : public ConfigException
virtual const char *what() const throw();
protected:
SettingException(const Setting &setting);
SettingException(const Setting &setting, int idx);
SettingException(const Setting &setting, const char *name);
......@@ -81,15 +77,10 @@ class LIBCONFIGXX_API SettingException : public ConfigException
class LIBCONFIGXX_API SettingTypeException : public SettingException
{
friend class Config;
friend class Setting;
public:
virtual const char *what() const throw();
private:
SettingTypeException(const Setting &setting);
SettingTypeException(const Setting &setting, int idx);
SettingTypeException(const Setting &setting, const char *name);
......@@ -97,15 +88,10 @@ class LIBCONFIGXX_API SettingTypeException : public SettingException
class LIBCONFIGXX_API SettingNotFoundException : public SettingException
{
friend class Config;
friend class Setting;
public:
virtual const char *what() const throw();
private:
SettingNotFoundException(const Setting &setting, int idx);
SettingNotFoundException(const Setting &setting, const char *name);
SettingNotFoundException(const char *path);
......@@ -113,15 +99,10 @@ class LIBCONFIGXX_API SettingNotFoundException : public SettingException
class LIBCONFIGXX_API SettingNameException : public SettingException
{
friend class Config;
friend class Setting;
public:
virtual const char *what() const throw();
private:
SettingNameException(const Setting &setting, const char *name);
};
......@@ -134,8 +115,6 @@ class LIBCONFIGXX_API FileIOException : public ConfigException
class LIBCONFIGXX_API ParseException : public ConfigException
{
friend class Config;
public:
ParseException(const ParseException &other);
......@@ -153,10 +132,10 @@ class LIBCONFIGXX_API ParseException : public ConfigException
virtual const char *what() const throw();
private:
ParseException(const char *file, int line, const char *error);
private:
const char *_file;
int _line;
const char *_error;
......
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