Remove exception specifications in favor of noexcept keyword
This commit is contained in:
@@ -19,15 +19,15 @@ namespace chaiscript {
|
|||||||
class bad_any_cast : public std::bad_cast
|
class bad_any_cast : public std::bad_cast
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bad_any_cast() throw()
|
bad_any_cast() noexcept
|
||||||
: m_what("bad any cast")
|
: m_what("bad any cast")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~bad_any_cast() throw() {}
|
virtual ~bad_any_cast() noexcept {}
|
||||||
|
|
||||||
/// \brief Description of what error occured
|
/// \brief Description of what error occured
|
||||||
virtual const char * what() const throw()
|
virtual const char * what() const noexcept
|
||||||
{
|
{
|
||||||
return m_what.c_str();
|
return m_what.c_str();
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ namespace chaiscript {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// construct/copy/destruct
|
// construct/copy/destruct
|
||||||
Any() {}
|
Any() = default;
|
||||||
|
|
||||||
Any(const Any &t_any)
|
Any(const Any &t_any)
|
||||||
{
|
{
|
||||||
|
@@ -22,25 +22,25 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to,
|
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to,
|
||||||
const std::string &t_what) throw()
|
const std::string &t_what) noexcept
|
||||||
: from(t_from), to(&t_to), m_what(t_what)
|
: from(t_from), to(&t_to), m_what(t_what)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to) throw()
|
bad_boxed_cast(const Type_Info &t_from, const std::type_info &t_to) noexcept
|
||||||
: from(t_from), to(&t_to), m_what("Cannot perform boxed_cast")
|
: from(t_from), to(&t_to), m_what("Cannot perform boxed_cast")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bad_boxed_cast(const std::string &t_what) throw()
|
bad_boxed_cast(const std::string &t_what) noexcept
|
||||||
: m_what(t_what)
|
: m_what(t_what)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~bad_boxed_cast() throw() {}
|
virtual ~bad_boxed_cast() noexcept {}
|
||||||
|
|
||||||
/// \brief Description of what error occured
|
/// \brief Description of what error occured
|
||||||
virtual const char * what() const throw()
|
virtual const char * what() const noexcept
|
||||||
{
|
{
|
||||||
return m_what.c_str();
|
return m_what.c_str();
|
||||||
}
|
}
|
||||||
|
@@ -41,12 +41,12 @@ namespace chaiscript
|
|||||||
class reserved_word_error : public std::runtime_error
|
class reserved_word_error : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
reserved_word_error(const std::string &t_word) throw()
|
reserved_word_error(const std::string &t_word) noexcept
|
||||||
: std::runtime_error("Reserved word not allowed in object name: " + t_word), m_word(t_word)
|
: std::runtime_error("Reserved word not allowed in object name: " + t_word), m_word(t_word)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~reserved_word_error() throw() {}
|
virtual ~reserved_word_error() noexcept {}
|
||||||
|
|
||||||
std::string word() const
|
std::string word() const
|
||||||
{
|
{
|
||||||
@@ -64,12 +64,12 @@ namespace chaiscript
|
|||||||
class global_non_const : public std::runtime_error
|
class global_non_const : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
global_non_const() throw()
|
global_non_const() noexcept
|
||||||
: std::runtime_error("a global object must be const")
|
: std::runtime_error("a global object must be const")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~global_non_const() throw() {}
|
virtual ~global_non_const() noexcept {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,22 +20,22 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bad_boxed_dynamic_cast(const Type_Info &t_from, const std::type_info &t_to,
|
bad_boxed_dynamic_cast(const Type_Info &t_from, const std::type_info &t_to,
|
||||||
const std::string &t_what) throw()
|
const std::string &t_what) noexcept
|
||||||
: bad_boxed_cast(t_from, t_to, t_what)
|
: bad_boxed_cast(t_from, t_to, t_what)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bad_boxed_dynamic_cast(const Type_Info &t_from, const std::type_info &t_to) throw()
|
bad_boxed_dynamic_cast(const Type_Info &t_from, const std::type_info &t_to) noexcept
|
||||||
: bad_boxed_cast(t_from, t_to)
|
: bad_boxed_cast(t_from, t_to)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bad_boxed_dynamic_cast(const std::string &w) throw()
|
bad_boxed_dynamic_cast(const std::string &w) noexcept
|
||||||
: bad_boxed_cast(w)
|
: bad_boxed_cast(w)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~bad_boxed_dynamic_cast() throw() {}
|
virtual ~bad_boxed_dynamic_cast() noexcept {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -188,11 +188,11 @@ namespace chaiscript
|
|||||||
class guard_error : public std::runtime_error
|
class guard_error : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
guard_error() throw()
|
guard_error() noexcept
|
||||||
: std::runtime_error("Guard evaluation failed")
|
: std::runtime_error("Guard evaluation failed")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual ~guard_error() throw()
|
virtual ~guard_error() noexcept
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -587,17 +587,17 @@ namespace chaiscript
|
|||||||
class dispatch_error : public std::runtime_error
|
class dispatch_error : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
dispatch_error() throw()
|
dispatch_error() noexcept
|
||||||
: std::runtime_error("No matching function to dispatch to")
|
: std::runtime_error("No matching function to dispatch to")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch_error(bool is_const) throw()
|
dispatch_error(bool is_const) noexcept
|
||||||
: std::runtime_error(std::string("No matching function to dispatch to") + (is_const?", parameter is const":""))
|
: std::runtime_error(std::string("No matching function to dispatch to") + (is_const?", parameter is const":""))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~dispatch_error() throw() {}
|
virtual ~dispatch_error() noexcept {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~arity_error() throw() {}
|
virtual ~arity_error() noexcept {}
|
||||||
|
|
||||||
int got;
|
int got;
|
||||||
int expected;
|
int expected;
|
||||||
|
@@ -70,17 +70,17 @@ namespace chaiscript
|
|||||||
std::string filename;
|
std::string filename;
|
||||||
std::vector<AST_NodePtr> call_stack;
|
std::vector<AST_NodePtr> call_stack;
|
||||||
|
|
||||||
eval_error(const std::string &t_why, const File_Position &t_where, const std::string &t_fname) throw() :
|
eval_error(const std::string &t_why, const File_Position &t_where, const std::string &t_fname) noexcept :
|
||||||
std::runtime_error(format(t_why, t_where, t_fname)),
|
std::runtime_error(format(t_why, t_where, t_fname)),
|
||||||
reason(t_why), start_position(t_where), end_position(t_where), filename(t_fname)
|
reason(t_why), start_position(t_where), end_position(t_where), filename(t_fname)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
eval_error(const std::string &t_why) throw()
|
eval_error(const std::string &t_why) noexcept
|
||||||
: std::runtime_error("Error: \"" + t_why + "\" "),
|
: std::runtime_error("Error: \"" + t_why + "\" "),
|
||||||
reason(t_why)
|
reason(t_why)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~eval_error() throw() {}
|
virtual ~eval_error() noexcept {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string format(const std::string &t_why, const File_Position &t_where, const std::string &t_fname)
|
static std::string format(const std::string &t_why, const File_Position &t_where, const std::string &t_fname)
|
||||||
@@ -98,11 +98,11 @@ namespace chaiscript
|
|||||||
* Errors generated when loading a file
|
* Errors generated when loading a file
|
||||||
*/
|
*/
|
||||||
struct file_not_found_error : public std::runtime_error {
|
struct file_not_found_error : public std::runtime_error {
|
||||||
file_not_found_error(const std::string &t_filename) throw()
|
file_not_found_error(const std::string &t_filename) noexcept
|
||||||
: std::runtime_error("File Not Found: " + t_filename)
|
: std::runtime_error("File Not Found: " + t_filename)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual ~file_not_found_error() throw() {}
|
virtual ~file_not_found_error() noexcept {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -35,12 +35,12 @@ namespace chaiscript
|
|||||||
/// \brief Thrown if an error occurs while attempting to load a binary module
|
/// \brief Thrown if an error occurs while attempting to load a binary module
|
||||||
struct load_module_error : std::runtime_error
|
struct load_module_error : std::runtime_error
|
||||||
{
|
{
|
||||||
load_module_error(const std::string &t_reason) throw()
|
load_module_error(const std::string &t_reason) noexcept
|
||||||
: std::runtime_error(t_reason)
|
: std::runtime_error(t_reason)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~load_module_error() throw()
|
virtual ~load_module_error() noexcept
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user