diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2018-06-07 14:12:01 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2018-06-07 15:16:19 +0200 |
commit | 4dfee545c97c677de29bd13a3e27ae39b9010e03 (patch) | |
tree | 98cd5963eac758ab197bcc37ab403010b5b77633 /src/lib/cc | |
parent | [5449] Extra fixes (diff) | |
download | kea-4dfee545c97c677de29bd13a3e27ae39b9010e03.tar.xz kea-4dfee545c97c677de29bd13a3e27ae39b9010e03.zip |
[5449] Removed explicit throws() in data.h
- dynamic exception specifications are deprecated in C++11
Diffstat (limited to 'src/lib/cc')
-rw-r--r-- | src/lib/cc/data.cc | 5 | ||||
-rw-r--r-- | src/lib/cc/data.h | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc index 4a83e688e0..0468369ea6 100644 --- a/src/lib/cc/data.cc +++ b/src/lib/cc/data.cc @@ -608,7 +608,7 @@ Element::nameToType(const std::string& type_name) { } ElementPtr -Element::fromJSON(std::istream& in, bool preproc) throw(JSONError) { +Element::fromJSON(std::istream& in, bool preproc) { int line = 1, pos = 1; stringstream filtered; @@ -623,7 +623,6 @@ Element::fromJSON(std::istream& in, bool preproc) throw(JSONError) { ElementPtr Element::fromJSON(std::istream& in, const std::string& file_name, bool preproc) - throw(JSONError) { int line = 1, pos = 1; stringstream filtered; @@ -635,7 +634,7 @@ Element::fromJSON(std::istream& in, const std::string& file_name, bool preproc) ElementPtr Element::fromJSON(std::istream& in, const std::string& file, int& line, - int& pos) throw(JSONError) + int& pos) { int c = 0; ElementPtr element; diff --git a/src/lib/cc/data.h b/src/lib/cc/data.h index d609615e9b..e8b225593f 100644 --- a/src/lib/cc/data.h +++ b/src/lib/cc/data.h @@ -425,10 +425,10 @@ public: /// @param in The string to parse the element from /// @param preproc specified whether preprocessing (e.g. comment removal) /// should be performed + /// @throw JSONError /// @return An ElementPtr that contains the element(s) specified /// in the given input stream. - static ElementPtr fromJSON(std::istream& in, bool preproc = false) - throw(JSONError); + static ElementPtr fromJSON(std::istream& in, bool preproc = false); /// Creates an Element from the given input stream containing JSON /// formatted data. @@ -437,11 +437,11 @@ public: /// @param file_name specified input file name (used in error reporting) /// @param preproc specified whether preprocessing (e.g. comment removal) /// should be performed + /// @throw JSONError /// @return An ElementPtr that contains the element(s) specified /// in the given input stream. static ElementPtr fromJSON(std::istream& in, const std::string& file_name, - bool preproc = false) - throw(JSONError); + bool preproc = false); /// Creates an Element from the given input stream, where we keep /// track of the location in the stream for error reporting. @@ -452,12 +452,12 @@ public: /// track of the current line. /// @param pos A reference to the int where the function keeps /// track of the current position within the current line. + /// @throw JSONError /// @return An ElementPtr that contains the element(s) specified /// in the given input stream. // make this one private? static ElementPtr fromJSON(std::istream& in, const std::string& file, - int& line, int &pos) - throw(JSONError); + int& line, int &pos); /// Reads contents of specified file and interprets it as JSON. /// |