pre-C++17: remove remaining old-style (dynamic) exception specifications

This commit is contained in:
Fischlurch 2018-04-26 12:07:08 +02:00
parent 7cc174808e
commit 3296148dad
16 changed files with 38 additions and 38 deletions

View file

@ -228,7 +228,7 @@ namespace lumiera {
ExitCode
AppState::abort () throw()
AppState::abort () noexcept
{
log_and_clear_unexpected_errorstate();

View file

@ -125,7 +125,7 @@ namespace lumiera {
/** initiate an fatal emergency shutdown,
* caused by an unforeseen error condition */
ExitCode abort () throw();
ExitCode abort () noexcept;

View file

@ -63,7 +63,7 @@ namespace query {
/** initialise the most basic internal defaults. */
DefsManager::DefsManager () throw()
DefsManager::DefsManager () noexcept
: defsRegistry_(new DefsRegistry)
{
TODO ("setup basic technical defaults of the session?");

View file

@ -133,7 +133,7 @@ namespace query {
public:
DefsManager () throw();
DefsManager () noexcept;
~DefsManager ();
/** common access point: retrieve the default object fulfilling

View file

@ -194,7 +194,7 @@ namespace lib {
* destruction order is maintained by explicitly invoking a cleanup
* operation on each of the low-level memory manager objects.
*/
AllocationCluster::~AllocationCluster() throw()
AllocationCluster::~AllocationCluster() noexcept
{
try
{ // avoiding a per-instance lock for now.

View file

@ -93,7 +93,7 @@ namespace lib {
public:
AllocationCluster ();
~AllocationCluster () throw();
~AllocationCluster () noexcept;
template<class TY>

View file

@ -58,7 +58,7 @@ namespace lumiera {
* @todo to be localised
*/
inline const string
default_usermsg (Error* exception_obj) throw()
default_usermsg (Error* exception_obj) noexcept
{
return string("Sorry, Lumiera encountered an internal error. (")
+ util::typeStr(*exception_obj) + ")";
@ -109,7 +109,7 @@ namespace lumiera {
/** @note we set the C-style errorstate as a side effect */
Error::Error (string description, CCStr id) throw()
Error::Error (string description, CCStr id) noexcept
: std::exception (),
id_ (error::default_or_given (id)),
msg_ (error::default_usermsg (this)),
@ -121,7 +121,7 @@ namespace lumiera {
Error::Error (std::exception const& cause,
string description, CCStr id) throw()
string description, CCStr id) noexcept
: std::exception (),
id_ (error::default_or_given (id)),
msg_ (error::default_usermsg (this)),
@ -133,7 +133,7 @@ namespace lumiera {
/** @note copy ctor behaves like chaining, i.e setting the cause_. */
Error::Error (const Error& ref) throw()
Error::Error (const Error& ref) noexcept
: std::exception (),
id_ (ref.id_),
msg_ (ref.msg_),
@ -149,7 +149,7 @@ namespace lumiera {
* generated output as well.
*/
CStr
Error::what() const throw()
Error::what() const noexcept
{
if (isnil (this->what_))
{
@ -165,7 +165,7 @@ namespace lumiera {
* first exception encountered in a chain of exceptions
*/
const string
Error::extractCauseMsg (const exception& cause) throw()
Error::extractCauseMsg (const exception& cause) noexcept
{
const Error* err=dynamic_cast<const Error*> (&cause);
if (err)
@ -189,7 +189,7 @@ namespace lumiera {
namespace error
{
void lumiera_unexpectedException () throw()
void lumiera_unexpectedException () noexcept
{
CCStr is_halted
= "### Lumiera halted due to an unexpected Error ###";

View file

@ -64,21 +64,21 @@ namespace lumiera {
class Error : public std::exception
{
public:
Error (string description="", const char* const id=LUMIERA_ERROR_EXCEPTION) throw();
Error (string description="", const char* const id=LUMIERA_ERROR_EXCEPTION) noexcept;
Error (std::exception const& cause,
string description="", const char* const id=LUMIERA_ERROR_EXCEPTION) throw();
string description="", const char* const id=LUMIERA_ERROR_EXCEPTION) noexcept;
Error (const Error&) throw();
virtual ~Error () throw() {};
Error (const Error&) noexcept;
virtual ~Error () noexcept {};
/** yield a diagnostic message characterising the problem */
virtual const char* what () const throw();
virtual const char* what () const noexcept;
/** the internal Lumiera-error-ID (was set as C-errorstate in ctor) */
const char* getID () const throw() { return this->id_; }
const char* getID () const noexcept { return this->id_; }
/** extract the message to be displayed for the user */
const string& getUsermsg () const throw();
const string& getUsermsg () const noexcept;
/** If this exception was caused by a chain of further exceptions,
* return the description of the first one registered in this throw sequence.
@ -86,13 +86,13 @@ namespace lumiera {
* is properly constructed by passing the original exception to the constructor
* @return the description string, maybe empty (if there is no known root cause)
*/
const string& rootCause () const throw() { return this->cause_; }
const string& rootCause () const noexcept { return this->cause_; }
/** replace the previous or default friendly message for the user. To be localised. */
Error& setUsermsg (const string& newMsg) throw() { this->msg_ = newMsg; return *this; }
Error& setUsermsg (const string& newMsg) noexcept { this->msg_ = newMsg; return *this; }
/** give additional developer info. Typically used at intermediate handlers to add context. */
Error& prependInfo (const string& text) throw() { this->desc_.insert (0,text); return *this; }
Error& prependInfo (const string& text) noexcept { this->desc_.insert (0,text); return *this; }
private:
@ -102,7 +102,7 @@ namespace lumiera {
mutable string what_; ///< buffer for generating the detailed description on demand
const string cause_; ///< description of first exception encountered in the chain
static const string extractCauseMsg (std::exception const&) throw();
static const string extractCauseMsg (std::exception const&) noexcept;
};
@ -120,7 +120,7 @@ namespace lumiera {
* can be considered a severe design flaw; we can just
* add some diagnostics prior to halting.
*/
void lumiera_unexpectedException () throw();
void lumiera_unexpectedException () noexcept;
/** throw an error::Fatal indicating "assertion failure" */
void assertion_terminate (const string& location);
@ -160,12 +160,12 @@ namespace lumiera {
{ \
public: \
CLASS (std::string description="", \
const char* id=_ID_) throw() \
const char* id=_ID_) noexcept \
: PARENT (description, id) {} \
\
CLASS (std::exception const& cause, \
std::string description="", \
const char* id=_ID_) throw() \
const char* id=_ID_) noexcept \
: PARENT (cause, description, id) {} \
};

View file

@ -149,7 +149,7 @@ namespace lib {
~RefArrayTable() { cleanup(); }
private:
void cleanup(size_t top=n) throw()
void cleanup(size_t top=n) noexcept
{
while (top) array_[--top].~IM();
}

View file

@ -140,7 +140,7 @@ namespace asset {
/**change the enablement status of this asset. */
bool
Asset::enable (bool on) throw(lumiera::error::State)
Asset::enable (bool on)
{
if (on == this->enabled)
return true;

View file

@ -299,7 +299,7 @@ namespace asset {
* @return \c false if the state could not be changed
* due to parent objects being disabled
*/
bool enable (bool on=true) throw(lumiera::error::State);
bool enable (bool on=true);
};

View file

@ -118,7 +118,7 @@ namespace mobject {
Session (DefaultsAccess,
ElementsAccess,
TimelineAccess,
SequenceAccess) throw();
SequenceAccess) noexcept;
virtual ~Session ();
@ -198,7 +198,7 @@ namespace mobject {
* This is the sole access path available for clients.
* @note there is no operator*
*/
virtual Session* operator-> () throw() =0;
virtual Session* operator-> () noexcept =0;
virtual ~SessManager();
};

View file

@ -209,7 +209,7 @@ namespace session {
* subsystem and the Defaults manager) is created on first
* \link #operator-> access \endlink to the session object.
*/
SessManagerImpl::SessManagerImpl () throw()
SessManagerImpl::SessManagerImpl ()
: pSess_{}
, lifecycle_{new SessionLifecycleDetails(pSess_)}
{

View file

@ -65,7 +65,7 @@ namespace session {
unique_ptr<SessionImplAPI> pSess_;
unique_ptr<LifecycleAdvisor> lifecycle_;
SessManagerImpl() throw();
SessManagerImpl();
friend class lib::DependencyFactory;
~SessManagerImpl() ;

View file

@ -130,7 +130,7 @@ namespace mobject {
Session::Session (DefaultsAccess defs
,ElementsAccess quer
,TimelineAccess tils
,SequenceAccess seqs) throw()
,SequenceAccess seqs) noexcept
: defaults(defs)
, elements(quer)
, timelines(tils)

View file

@ -112,7 +112,7 @@ namespace lumiera {
* Some levels up, this error get caught and the root cause can be
* extracted successfully.
*/
void nestedThrower (string msg) throw(Error)
void nestedThrower (string msg)
{
try { throwExternal(msg); }
catch (std::exception& e)
@ -124,7 +124,7 @@ namespace lumiera {
}
/** @test repeated repackaging and rethrowing */
void doubleNestedTh (string msg) throw(error::Config)
void doubleNestedTh (string msg)
{
try { nestedThrower (msg); }
catch (Error& e)
@ -208,7 +208,7 @@ namespace lumiera {
* @note inside error.hpp, an initialisation hook has been installed into
* AppState, causing our own unknown() handler to be installed and
* invoked, which gives additional diagnostics.*/
void terminateUnknown () throw()
void terminateUnknown () noexcept
{
throw Error("You'll never get me, won't you?");
}