remove remaining usage of deprecated dymamic exceptions: dtors are implicitely noexcept
+ qualify what
methods with noexcept
This commit is contained in:
parent
2845cdc121
commit
4c22e631a7
13 changed files with 31 additions and 36 deletions
|
@ -41,10 +41,8 @@ public:
|
|||
config_error(std::string const& what,
|
||||
unsigned line_number,
|
||||
std::string const& filename);
|
||||
virtual ~config_error() throw() {}
|
||||
|
||||
virtual const char * what() const throw();
|
||||
|
||||
virtual ~config_error() {}
|
||||
virtual const char * what() const noexcept;
|
||||
void append_context(std::string const& ctx) const;
|
||||
void append_context(std::string const& ctx, xml_node const& node) const;
|
||||
void append_context(xml_node const& node) const;
|
||||
|
|
|
@ -46,14 +46,11 @@ class MAPNIK_DECL datasource_exception : public std::exception
|
|||
public:
|
||||
datasource_exception(std::string const& message)
|
||||
: message_(message)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
~datasource_exception() throw()
|
||||
{
|
||||
}
|
||||
~datasource_exception() {}
|
||||
|
||||
virtual const char* what() const throw()
|
||||
virtual const char* what() const noexcept
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ public:
|
|||
what_( _what )
|
||||
{
|
||||
}
|
||||
virtual ~illegal_enum_value() throw() {}
|
||||
virtual ~illegal_enum_value() {}
|
||||
|
||||
virtual const char * what() const throw()
|
||||
virtual const char * what() const noexcept
|
||||
{
|
||||
return what_.c_str();
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
void get_control_points(double &x1, double &y1, double &x2, double &y2) const;
|
||||
|
||||
private:
|
||||
void swap(gradient& other) throw();
|
||||
void swap(gradient& other) noexcept;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ public:
|
|||
image_reader_exception(std::string const& message)
|
||||
: message_(message) {}
|
||||
|
||||
~image_reader_exception() throw() {}
|
||||
~image_reader_exception() {}
|
||||
|
||||
virtual const char* what() const throw()
|
||||
virtual const char* what() const noexcept
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ public:
|
|||
image_writer_exception(std::string const& message)
|
||||
: message_(message) {}
|
||||
|
||||
~image_writer_exception() throw() {}
|
||||
~image_writer_exception(){}
|
||||
|
||||
virtual const char* what() const throw()
|
||||
virtual const char* what() const noexcept
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ public:
|
|||
svg_parser_exception(std::string const& message)
|
||||
: message_(message) {}
|
||||
|
||||
~svg_parser_exception() throw() {}
|
||||
~svg_parser_exception() {}
|
||||
|
||||
virtual const char* what() const throw()
|
||||
virtual const char* what() const noexcept
|
||||
{
|
||||
return message_.c_str();
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual ~value_error() throw() {}
|
||||
virtual ~value_error() {}
|
||||
|
||||
virtual const char * what() const throw()
|
||||
virtual const char * what() const noexcept
|
||||
{
|
||||
return what_.c_str();
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ class MAPNIK_DECL node_not_found: public std::exception
|
|||
{
|
||||
public:
|
||||
node_not_found(std::string const& node_name);
|
||||
virtual const char* what() const throw();
|
||||
~node_not_found() throw ();
|
||||
virtual const char* what() const noexcept;
|
||||
~node_not_found();
|
||||
private:
|
||||
std::string node_name_;
|
||||
protected:
|
||||
|
@ -65,8 +65,8 @@ class MAPNIK_DECL attribute_not_found: public std::exception
|
|||
{
|
||||
public:
|
||||
attribute_not_found(std::string const& node_name, std::string const& attribute_name);
|
||||
virtual const char* what() const throw();
|
||||
~attribute_not_found() throw ();
|
||||
virtual const char* what() const noexcept;
|
||||
~attribute_not_found();
|
||||
private:
|
||||
std::string node_name_;
|
||||
std::string attribute_name_;
|
||||
|
@ -78,8 +78,8 @@ class MAPNIK_DECL more_than_one_child: public std::exception
|
|||
{
|
||||
public:
|
||||
more_than_one_child(std::string const& node_name);
|
||||
virtual const char* what() const throw();
|
||||
~more_than_one_child() throw ();
|
||||
virtual const char* what() const noexcept;
|
||||
~more_than_one_child();
|
||||
private:
|
||||
std::string node_name_;
|
||||
protected:
|
||||
|
|
|
@ -44,7 +44,7 @@ raster_info::raster_info(const raster_info& rhs)
|
|||
{
|
||||
}
|
||||
|
||||
void raster_info::swap(raster_info& other) //throw()
|
||||
void raster_info::swap(raster_info& other)
|
||||
{
|
||||
std::swap(file_,other.file_);
|
||||
std::swap(format_,other.format_);
|
||||
|
|
|
@ -37,7 +37,7 @@ config_error::config_error(std::string const& what,
|
|||
{
|
||||
}
|
||||
|
||||
char const* config_error::what() const throw()
|
||||
char const* config_error::what() const noexcept
|
||||
{
|
||||
msg_ = what_;
|
||||
if (!node_name_.empty())
|
||||
|
|
|
@ -121,7 +121,7 @@ stop_array const& gradient::get_stop_array() const
|
|||
return stops_;
|
||||
}
|
||||
|
||||
void gradient::swap(gradient& other) throw()
|
||||
void gradient::swap(gradient& other) noexcept
|
||||
{
|
||||
std::swap(gradient_type_, other.gradient_type_);
|
||||
std::swap(stops_, other.stops_);
|
||||
|
|
|
@ -133,13 +133,13 @@ node_not_found::node_not_found(std::string const& node_name)
|
|||
: node_name_(node_name),
|
||||
msg_() {}
|
||||
|
||||
const char* node_not_found::what() const throw()
|
||||
const char* node_not_found::what() const noexcept
|
||||
{
|
||||
msg_ = std::string("Node "+node_name_+ "not found");
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
||||
node_not_found::~node_not_found() throw() {}
|
||||
node_not_found::~node_not_found() {}
|
||||
|
||||
|
||||
attribute_not_found::attribute_not_found(std::string const& node_name,
|
||||
|
@ -148,25 +148,25 @@ attribute_not_found::attribute_not_found(std::string const& node_name,
|
|||
attribute_name_(attribute_name),
|
||||
msg_() {}
|
||||
|
||||
const char* attribute_not_found::what() const throw()
|
||||
const char* attribute_not_found::what() const noexcept
|
||||
{
|
||||
msg_ = std::string("Attribute '" + attribute_name_ +"' not found in node '"+node_name_+ "'");
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
||||
attribute_not_found::~attribute_not_found() throw() {}
|
||||
attribute_not_found::~attribute_not_found() {}
|
||||
|
||||
more_than_one_child::more_than_one_child(std::string const& node_name)
|
||||
: node_name_(node_name),
|
||||
msg_() {}
|
||||
|
||||
const char* more_than_one_child::what() const throw()
|
||||
const char* more_than_one_child::what() const noexcept
|
||||
{
|
||||
msg_ = std::string("More than one child node in node '" + node_name_ +"'");
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
||||
more_than_one_child::~more_than_one_child() throw() {}
|
||||
more_than_one_child::~more_than_one_child() {}
|
||||
|
||||
xml_node::xml_node(xml_tree &tree, std::string && name, unsigned line, bool is_text)
|
||||
: tree_(tree),
|
||||
|
|
Loading…
Reference in a new issue