Replaced cases of throw() with NOEXCEPT
This commit is contained in:
parent
e22c8967ee
commit
c5aa4f2086
13 changed files with 32 additions and 26 deletions
|
@ -45,7 +45,7 @@ struct editor_map_load_exception : public editor_exception
|
|||
: editor_exception(msg), filename(fn)
|
||||
{
|
||||
}
|
||||
~editor_map_load_exception() throw() {}
|
||||
~editor_map_load_exception() NOEXCEPT {}
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
|
@ -55,7 +55,7 @@ struct editor_map_save_exception : public editor_exception
|
|||
: editor_exception(msg)
|
||||
{
|
||||
}
|
||||
~editor_map_save_exception() throw() {}
|
||||
~editor_map_save_exception() NOEXCEPT {}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#ifndef EXCEPTIONS_HPP_INCLUDED
|
||||
#define EXCEPTIONS_HPP_INCLUDED
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
|
@ -30,9 +32,9 @@ struct error : std::exception
|
|||
|
||||
error() : message() {}
|
||||
error(const std::string &msg) : message(msg) {}
|
||||
~error() throw() {}
|
||||
~error() NOEXCEPT {}
|
||||
|
||||
const char *what() const throw()
|
||||
const char *what() const NOEXCEPT
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
|
|
|
@ -113,9 +113,9 @@ namespace {
|
|||
public:
|
||||
|
||||
//Not used by boost filesystem
|
||||
int do_encoding() const throw() { return 0; }
|
||||
int do_encoding() const NOEXCEPT { return 0; }
|
||||
//Not used by boost filesystem
|
||||
bool do_always_noconv() const throw() { return false; }
|
||||
bool do_always_noconv() const NOEXCEPT { return false; }
|
||||
int do_length( std::mbstate_t& /*state*/,
|
||||
const char* /*from*/,
|
||||
const char* /*from_end*/,
|
||||
|
|
|
@ -88,7 +88,7 @@ struct formula_error : public game::error
|
|||
formula_error(const std::string& type, const std::string& formula,
|
||||
const std::string& file, int line);
|
||||
|
||||
~formula_error() throw() {}
|
||||
~formula_error() NOEXCEPT {}
|
||||
|
||||
std::string type;
|
||||
std::string formula;
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
, std::exception()
|
||||
{
|
||||
}
|
||||
const char * what() const throw() { return "return_to_play_side_exception"; }
|
||||
const char * what() const NOEXCEPT { return "return_to_play_side_exception"; }
|
||||
private:
|
||||
|
||||
IMPLEMENT_LUA_JAILBREAK_EXCEPTION(return_to_play_side_exception)
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
, std::exception()
|
||||
{
|
||||
}
|
||||
const char * what() const throw() { return "quit_game_exception"; }
|
||||
const char * what() const NOEXCEPT { return "quit_game_exception"; }
|
||||
private:
|
||||
IMPLEMENT_LUA_JAILBREAK_EXCEPTION(quit_game_exception)
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
*/
|
||||
imod_exception(const std::string& message);
|
||||
|
||||
~imod_exception() throw() {}
|
||||
~imod_exception() NOEXCEPT {}
|
||||
|
||||
/** The error message regarding the failed operation. */
|
||||
const std::string message;
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual ~libc_error() throw()
|
||||
virtual ~libc_error() NOEXCEPT
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
}
|
||||
|
||||
/** Returns an explanatory string describing the exception. */
|
||||
const char* what() const throw()
|
||||
const char* what() const NOEXCEPT
|
||||
{
|
||||
return msg_.c_str();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
lua_jailbreak_exception *lua_jailbreak_exception::jailbreak_exception = nullptr;
|
||||
|
||||
void lua_jailbreak_exception::store() const throw()
|
||||
void lua_jailbreak_exception::store() const NOEXCEPT
|
||||
{
|
||||
/*
|
||||
* It should not be possible to call this function with an exception still
|
||||
|
@ -54,7 +54,7 @@ void lua_jailbreak_exception::rethrow()
|
|||
assert(false);
|
||||
}
|
||||
|
||||
void lua_jailbreak_exception::clear() throw()
|
||||
void lua_jailbreak_exception::clear() NOEXCEPT
|
||||
{
|
||||
delete jailbreak_exception;
|
||||
jailbreak_exception = nullptr;
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
class lua_jailbreak_exception
|
||||
{
|
||||
public:
|
||||
virtual ~lua_jailbreak_exception() throw() {}
|
||||
virtual ~lua_jailbreak_exception() NOEXCEPT {}
|
||||
|
||||
/** Stores a copy the current exception to be rethrown. */
|
||||
void store() const throw();
|
||||
void store() const NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Rethrows the stored exception.
|
||||
|
@ -46,7 +46,7 @@ protected:
|
|||
private:
|
||||
|
||||
/** Clears the current exception. */
|
||||
static void clear() throw();
|
||||
static void clear() NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Creates a copy of the current exception.
|
||||
|
|
|
@ -78,6 +78,8 @@
|
|||
#ifndef MAKE_ENUM_HPP
|
||||
#define MAKE_ENUM_HPP
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
@ -98,19 +100,19 @@ public:
|
|||
, bad_val(str)
|
||||
{}
|
||||
|
||||
virtual ~bad_enum_cast() throw() {}
|
||||
virtual ~bad_enum_cast() NOEXCEPT {}
|
||||
|
||||
const char * what() const throw()
|
||||
const char * what() const NOEXCEPT
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
|
||||
const char * type() const throw()
|
||||
|
||||
const char * type() const NOEXCEPT
|
||||
{
|
||||
return name.c_str();
|
||||
}
|
||||
|
||||
const char * value() const throw()
|
||||
|
||||
const char * value() const NOEXCEPT
|
||||
{
|
||||
return bad_val.c_str();
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#ifndef NAME_GENERATOR_HPP_INCLUDED
|
||||
#define NAME_GENERATOR_HPP_INCLUDED
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <exception>
|
||||
|
@ -22,7 +24,7 @@
|
|||
class name_generator_invalid_exception : public std::exception {
|
||||
public:
|
||||
name_generator_invalid_exception(const char* errMessage):errMessage_(errMessage) {}
|
||||
const char* what() const throw() { return errMessage_; }
|
||||
const char* what() const NOEXCEPT { return errMessage_; }
|
||||
|
||||
private:
|
||||
const char* errMessage_;
|
||||
|
|
|
@ -26,7 +26,7 @@ class invalid_variablename_exception : public std::exception
|
|||
{
|
||||
public:
|
||||
invalid_variablename_exception() : std::exception() {}
|
||||
const char* what() const throw()
|
||||
const char* what() const NOEXCEPT
|
||||
{
|
||||
return "invalid_variablename_exception";
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ struct wml_exception
|
|||
{
|
||||
}
|
||||
|
||||
~wml_exception() throw() {}
|
||||
~wml_exception() NOEXCEPT {}
|
||||
|
||||
/**
|
||||
* The message for the user explaining what went wrong. This message can
|
||||
|
|
Loading…
Add table
Reference in a new issue