X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fexcept.h;h=ceb95e30f13a6ebeaf83950f5a2fc711054699a9;hb=e14c01b5775dd2e324b16ff49498db9b9113c523;hp=34d9e77810d838b694e0023a364271ecd1bb5afc;hpb=ef12cc79fddd527e895169f62d7424b18d5937ca;p=libs%2Fdatafile.git diff --git a/source/except.h b/source/except.h index 34d9e77..ceb95e3 100644 --- a/source/except.h +++ b/source/except.h @@ -12,13 +12,13 @@ class data_error: public std::runtime_error { private: std::string source; - unsigned line; + unsigned line = 0; public: data_error(const std::string &, unsigned, const std::string &); data_error(const std::string &, unsigned, const std::exception &); data_error(const std::string &, unsigned, const data_error &); - virtual ~data_error() throw() { } + virtual ~data_error() throw() = default; const std::string &get_source() const { return source; } unsigned get_line() const { return line; } @@ -32,7 +32,7 @@ class parse_error: public std::runtime_error { public: parse_error(const std::string &); - virtual ~parse_error() throw() { } + virtual ~parse_error() throw() = default; }; @@ -40,7 +40,7 @@ class syntax_error: public std::runtime_error { public: syntax_error(const std::string &t); - virtual ~syntax_error() throw() { } + virtual ~syntax_error() throw() = default; }; @@ -48,7 +48,7 @@ class bad_definition: public std::runtime_error { public: bad_definition(const std::string &w); - virtual ~bad_definition() throw() { } + virtual ~bad_definition() throw() = default; }; @@ -56,7 +56,7 @@ class nesting_error: public std::logic_error { public: nesting_error(const std::string &); - virtual ~nesting_error() throw() { } + virtual ~nesting_error() throw() = default; }; @@ -64,7 +64,7 @@ class unknown_keyword: public std::runtime_error { public: unknown_keyword(const std::string &); - virtual ~unknown_keyword() throw() { } + virtual ~unknown_keyword() throw() = default; }; @@ -72,7 +72,7 @@ class invalid_signature: public std::runtime_error { public: invalid_signature(const std::string &, const std::string &); - virtual ~invalid_signature() throw() { } + virtual ~invalid_signature() throw() = default; };