aboutsummaryrefslogtreecommitdiff
path: root/paludis/util
diff options
context:
space:
mode:
authorAvatar Wouter van Kesteren <woutershep@gmail.com> 2015-05-08 05:12:20 +0200
committerAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2015-08-21 17:19:40 +0200
commit82a9e92b64b79eb2db0047bead68f227c9c31e24 (patch)
tree4a924d622b732b2e5ad9c961b512934a83b8bd1f /paludis/util
parente6dfb43fcbb0a760777376611035485c352e85ae (diff)
downloadpaludis-82a9e92b64b79eb2db0047bead68f227c9c31e24.tar.gz
paludis-82a9e92b64b79eb2db0047bead68f227c9c31e24.tar.xz
throw() -> noexcept
Change-Id: I461abfda8b7297c1bd04f1090f8d58fa96364616 Reviewed-on: https://galileo.mailstation.de/gerrit/1892 Reviewed-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Kylie McClain <somasis@exherbo.org>
Diffstat (limited to 'paludis/util')
-rw-r--r--paludis/util/config_file.cc4
-rw-r--r--paludis/util/config_file.hh4
-rw-r--r--paludis/util/destringify.cc2
-rw-r--r--paludis/util/destringify.hh2
-rw-r--r--paludis/util/elf.cc2
-rw-r--r--paludis/util/elf.hh2
-rw-r--r--paludis/util/exception.cc18
-rw-r--r--paludis/util/exception.hh18
-rw-r--r--paludis/util/fs_error.cc2
-rw-r--r--paludis/util/fs_error.hh2
-rw-r--r--paludis/util/graph.cc6
-rw-r--r--paludis/util/graph.hh12
-rw-r--r--paludis/util/process.cc2
-rw-r--r--paludis/util/process.hh2
-rw-r--r--paludis/util/pty.cc2
-rw-r--r--paludis/util/pty.hh2
-rw-r--r--paludis/util/safe_ifstream.cc2
-rw-r--r--paludis/util/safe_ifstream.hh2
-rw-r--r--paludis/util/safe_ofstream.cc2
-rw-r--r--paludis/util/safe_ofstream.hh2
-rw-r--r--paludis/util/singleton_TEST.cc2
-rw-r--r--paludis/util/system.cc2
-rw-r--r--paludis/util/system.hh2
-rw-r--r--paludis/util/thread_pool.cc2
-rw-r--r--paludis/util/thread_pool.hh2
-rw-r--r--paludis/util/thread_pool_TEST.cc2
-rw-r--r--paludis/util/tokeniser.cc2
-rw-r--r--paludis/util/tokeniser.hh2
-rw-r--r--paludis/util/wildcard_expander.cc2
-rw-r--r--paludis/util/wildcard_expander.hh2
30 files changed, 55 insertions, 55 deletions
diff --git a/paludis/util/config_file.cc b/paludis/util/config_file.cc
index 708df8186..c9b497781 100644
--- a/paludis/util/config_file.cc
+++ b/paludis/util/config_file.cc
@@ -56,12 +56,12 @@ namespace paludis
};
}
-ConfigFileError::ConfigFileError(const std::string & filename, const std::string & m) throw () :
+ConfigFileError::ConfigFileError(const std::string & filename, const std::string & m) noexcept :
ConfigurationError(filename.empty() ? m : "In file '" + filename + "': " + m)
{
}
-ConfigFileError::ConfigFileError(const std::string & m) throw () :
+ConfigFileError::ConfigFileError(const std::string & m) noexcept :
ConfigurationError(m)
{
}
diff --git a/paludis/util/config_file.hh b/paludis/util/config_file.hh
index 1b2d69585..e3926a107 100644
--- a/paludis/util/config_file.hh
+++ b/paludis/util/config_file.hh
@@ -66,14 +66,14 @@ namespace paludis
* the filename is not necessarily known.
* \param message A description of the error.
*/
- ConfigFileError(const std::string & filename, const std::string & message) throw ();
+ ConfigFileError(const std::string & filename, const std::string & message) noexcept;
/**
* Constructor, where the filename is not known.
*
* \param message A description of the error.
*/
- ConfigFileError(const std::string & message) throw ();
+ ConfigFileError(const std::string & message) noexcept;
///\}
};
diff --git a/paludis/util/destringify.cc b/paludis/util/destringify.cc
index a402a7a17..7387feb51 100644
--- a/paludis/util/destringify.cc
+++ b/paludis/util/destringify.cc
@@ -21,7 +21,7 @@
using namespace paludis;
-DestringifyError::DestringifyError(const std::string & str) throw () :
+DestringifyError::DestringifyError(const std::string & str) noexcept :
Exception("Couldn't destringify '" + str + "'")
{
}
diff --git a/paludis/util/destringify.hh b/paludis/util/destringify.hh
index 11452746a..ec02b82a4 100644
--- a/paludis/util/destringify.hh
+++ b/paludis/util/destringify.hh
@@ -50,7 +50,7 @@ namespace paludis
///\name Basic operations
///\{
- DestringifyError(const std::string & str) throw ();
+ DestringifyError(const std::string & str) noexcept;
///\}
};
diff --git a/paludis/util/elf.cc b/paludis/util/elf.cc
index 7f6771a39..3508f8f5b 100644
--- a/paludis/util/elf.cc
+++ b/paludis/util/elf.cc
@@ -220,7 +220,7 @@ InvalidElfFileError::InvalidElfFileError(const InvalidElfFileError & other) :
{
}
-InvalidElfFileError::InvalidElfFileError(const std::string & s) throw ():
+InvalidElfFileError::InvalidElfFileError(const std::string & s) noexcept:
Exception(s)
{
}
diff --git a/paludis/util/elf.hh b/paludis/util/elf.hh
index b3697b13f..e4410a500 100644
--- a/paludis/util/elf.hh
+++ b/paludis/util/elf.hh
@@ -36,7 +36,7 @@ namespace paludis
{
public:
InvalidElfFileError(const InvalidElfFileError &);
- InvalidElfFileError(const std::string &) throw ();
+ InvalidElfFileError(const std::string &) noexcept;
};
template <typename ElfType_>
diff --git a/paludis/util/exception.cc b/paludis/util/exception.cc
index 6a46e4ae9..b6b1fa749 100644
--- a/paludis/util/exception.cc
+++ b/paludis/util/exception.cc
@@ -85,7 +85,7 @@ namespace paludis
};
}
-Exception::Exception(const std::string & m) throw () :
+Exception::Exception(const std::string & m) noexcept :
_message(m),
_context_data(new ContextData)
{
@@ -98,13 +98,13 @@ Exception::Exception(const Exception & other) :
{
}
-Exception::~Exception() throw ()
+Exception::~Exception() noexcept
{
delete _context_data;
}
const std::string &
-Exception::message() const throw ()
+Exception::message() const noexcept
{
return _message;
}
@@ -121,34 +121,34 @@ Exception::empty() const
return _context_data->local_context.empty();
}
-NotAvailableError::NotAvailableError(const std::string & msg) throw () :
+NotAvailableError::NotAvailableError(const std::string & msg) noexcept :
Exception("Error: Not available: " + msg)
{
}
-InternalError::InternalError(const std::string & location, const std::string & our_message) throw () :
+InternalError::InternalError(const std::string & location, const std::string & our_message) noexcept :
Exception("Eek! Internal error at " + location + ": " + our_message)
{
std::cerr << "Internal error at " << location << ": " << our_message << std::endl;
}
-NameError::NameError(const std::string & name, const std::string & role) throw () :
+NameError::NameError(const std::string & name, const std::string & role) noexcept :
Exception("Name '" + name + "' is not a valid " + role)
{
}
-NameError::NameError(const std::string & name, const std::string & role, const std::string & msg) throw () :
+NameError::NameError(const std::string & name, const std::string & role, const std::string & msg) noexcept :
Exception("Name '" + name + "' is not a valid " + role + ": " + msg)
{
}
-ConfigurationError::ConfigurationError(const std::string & msg) throw () :
+ConfigurationError::ConfigurationError(const std::string & msg) noexcept :
Exception(msg)
{
}
const char *
-Exception::what() const throw ()
+Exception::what() const noexcept
{
#ifdef HAVE_CXA_DEMANGLE
if (_what_str.empty())
diff --git a/paludis/util/exception.hh b/paludis/util/exception.hh
index 0f5a5dfcf..8a0206227 100644
--- a/paludis/util/exception.hh
+++ b/paludis/util/exception.hh
@@ -86,7 +86,7 @@ namespace paludis
///\name Basic operations
///\{
- Exception(const std::string & message) throw ();
+ Exception(const std::string & message) noexcept;
Exception(const Exception &);
@@ -96,14 +96,14 @@ namespace paludis
///\name Basic operations
///\{
- virtual ~Exception() throw () PALUDIS_ATTRIBUTE((nothrow));
+ virtual ~Exception() noexcept PALUDIS_ATTRIBUTE((nothrow));
///\}
/**
* Return our descriptive error message.
*/
- const std::string & message() const throw () PALUDIS_ATTRIBUTE((nothrow));
+ const std::string & message() const noexcept PALUDIS_ATTRIBUTE((nothrow));
/**
* Make a backtrace.
@@ -118,7 +118,7 @@ namespace paludis
/**
* A better what, if possible.
*/
- const char * what() const throw ();
+ const char * what() const noexcept;
};
/**
@@ -139,7 +139,7 @@ namespace paludis
*
* \param message A short message.
*/
- InternalError(const std::string & location, const std::string & message) throw ();
+ InternalError(const std::string & location, const std::string & message) noexcept;
};
/**
@@ -157,7 +157,7 @@ namespace paludis
/**
* Constructor.
*/
- NotAvailableError(const std::string & message) throw ();
+ NotAvailableError(const std::string & message) noexcept;
};
/**
@@ -178,7 +178,7 @@ namespace paludis
* \param name The invalid name encountered.
* \param role The role for the name, for example "package name".
*/
- NameError(const std::string & name, const std::string & role) throw ();
+ NameError(const std::string & name, const std::string & role) noexcept;
/**
* Constructor.
@@ -188,7 +188,7 @@ namespace paludis
* \param msg Any extra message.
*/
NameError(const std::string & name, const std::string & role,
- const std::string & msg) throw ();
+ const std::string & msg) noexcept;
};
/**
@@ -204,7 +204,7 @@ namespace paludis
/**
* Constructor.
*/
- ConfigurationError(const std::string & msg) throw ();
+ ConfigurationError(const std::string & msg) noexcept;
};
/** \def PALUDIS_HERE
diff --git a/paludis/util/fs_error.cc b/paludis/util/fs_error.cc
index cabcc06e0..e235fde31 100644
--- a/paludis/util/fs_error.cc
+++ b/paludis/util/fs_error.cc
@@ -23,7 +23,7 @@
using namespace paludis;
-FSError::FSError(const std::string & our_message) throw () :
+FSError::FSError(const std::string & our_message) noexcept :
Exception(our_message)
{
}
diff --git a/paludis/util/fs_error.hh b/paludis/util/fs_error.hh
index 352a3c1a9..3f1466c61 100644
--- a/paludis/util/fs_error.hh
+++ b/paludis/util/fs_error.hh
@@ -39,7 +39,7 @@ namespace paludis
///\name Basic operations
///\{
- FSError(const std::string & message) throw ();
+ FSError(const std::string & message) noexcept;
///\}
};
diff --git a/paludis/util/graph.cc b/paludis/util/graph.cc
index 7575c1704..fcf29590b 100644
--- a/paludis/util/graph.cc
+++ b/paludis/util/graph.cc
@@ -22,13 +22,13 @@
using namespace paludis;
-GraphError::GraphError(const std::string & msg) throw () :
+GraphError::GraphError(const std::string & msg) noexcept :
Exception(msg)
{
}
NoGraphTopologicalOrderExistsError::NoGraphTopologicalOrderExistsError(
- const std::shared_ptr<const RemainingNodes> & r) throw () :
+ const std::shared_ptr<const RemainingNodes> & r) noexcept :
GraphError("No topological order exists"),
_remaining_nodes(r)
{
@@ -40,7 +40,7 @@ NoGraphTopologicalOrderExistsError::remaining_nodes() const
return _remaining_nodes;
}
-NoGraphTopologicalOrderExistsError::~NoGraphTopologicalOrderExistsError() throw ()
+NoGraphTopologicalOrderExistsError::~NoGraphTopologicalOrderExistsError() noexcept
{
}
diff --git a/paludis/util/graph.hh b/paludis/util/graph.hh
index f8eacf6bd..b2b259f14 100644
--- a/paludis/util/graph.hh
+++ b/paludis/util/graph.hh
@@ -52,7 +52,7 @@ namespace paludis
///\name Basic operations
///\{
- GraphError(const std::string & msg) throw ();
+ GraphError(const std::string & msg) noexcept;
///\}
};
@@ -72,13 +72,13 @@ namespace paludis
///\{
template <typename Node_>
- NoSuchGraphNodeError(const Node_ & node) throw () :
+ NoSuchGraphNodeError(const Node_ & node) noexcept :
GraphError("Node '" + stringify(node) + "' does not exist")
{
}
template <typename Node_>
- NoSuchGraphNodeError(const std::shared_ptr<Node_> & node) throw () :
+ NoSuchGraphNodeError(const std::shared_ptr<Node_> & node) noexcept :
GraphError("Node '" + stringify(*node) + "' does not exist")
{
}
@@ -101,7 +101,7 @@ namespace paludis
///\{
template <typename Node_>
- NoSuchGraphEdgeError(const Node_ & e1, const Node_ & e2) throw () :
+ NoSuchGraphEdgeError(const Node_ & e1, const Node_ & e2) noexcept :
GraphError("Edge '" + stringify(e1) + "' -> '" + stringify(e2) + "' does not exist")
{
}
@@ -129,8 +129,8 @@ namespace paludis
///\name Basic operations
///\{
- NoGraphTopologicalOrderExistsError(const std::shared_ptr<const RemainingNodes> &) throw ();
- ~NoGraphTopologicalOrderExistsError() throw ();
+ NoGraphTopologicalOrderExistsError(const std::shared_ptr<const RemainingNodes> &) noexcept;
+ ~NoGraphTopologicalOrderExistsError() noexcept;
///\}
diff --git a/paludis/util/process.cc b/paludis/util/process.cc
index 3b59d0bde..b4b553db1 100644
--- a/paludis/util/process.cc
+++ b/paludis/util/process.cc
@@ -51,7 +51,7 @@
using namespace paludis;
-ProcessError::ProcessError(const std::string & s) throw () :
+ProcessError::ProcessError(const std::string & s) noexcept :
Exception(s)
{
}
diff --git a/paludis/util/process.hh b/paludis/util/process.hh
index 108a239b7..02686383e 100644
--- a/paludis/util/process.hh
+++ b/paludis/util/process.hh
@@ -43,7 +43,7 @@ namespace paludis
public Exception
{
public:
- ProcessError(const std::string &) throw ();
+ ProcessError(const std::string &) noexcept;
};
class PALUDIS_VISIBLE ProcessCommand
diff --git a/paludis/util/pty.cc b/paludis/util/pty.cc
index d39b1282f..754fdad3a 100644
--- a/paludis/util/pty.cc
+++ b/paludis/util/pty.cc
@@ -35,7 +35,7 @@
using namespace paludis;
-PtyError::PtyError(const std::string & our_message) throw () :
+PtyError::PtyError(const std::string & our_message) noexcept :
Exception(our_message)
{
}
diff --git a/paludis/util/pty.hh b/paludis/util/pty.hh
index 71877c6de..9ce95a501 100644
--- a/paludis/util/pty.hh
+++ b/paludis/util/pty.hh
@@ -50,7 +50,7 @@ namespace paludis
///\name Basic operations
///\{
- PtyError(const std::string & message) throw ();
+ PtyError(const std::string & message) noexcept;
///\}
};
diff --git a/paludis/util/safe_ifstream.cc b/paludis/util/safe_ifstream.cc
index dce4edae3..999d1e436 100644
--- a/paludis/util/safe_ifstream.cc
+++ b/paludis/util/safe_ifstream.cc
@@ -128,7 +128,7 @@ SafeIFStream::~SafeIFStream()
::close(buf.fd);
}
-SafeIFStreamError::SafeIFStreamError(const std::string & s) throw () :
+SafeIFStreamError::SafeIFStreamError(const std::string & s) noexcept :
Exception(s)
{
}
diff --git a/paludis/util/safe_ifstream.hh b/paludis/util/safe_ifstream.hh
index 70a634723..5c381bbf0 100644
--- a/paludis/util/safe_ifstream.hh
+++ b/paludis/util/safe_ifstream.hh
@@ -127,7 +127,7 @@ namespace paludis
public Exception
{
public:
- SafeIFStreamError(const std::string &) throw ();
+ SafeIFStreamError(const std::string &) noexcept;
};
}
diff --git a/paludis/util/safe_ofstream.cc b/paludis/util/safe_ofstream.cc
index 9f23390b3..d060f6188 100644
--- a/paludis/util/safe_ofstream.cc
+++ b/paludis/util/safe_ofstream.cc
@@ -149,7 +149,7 @@ SafeOFStream::~SafeOFStream() noexcept(false)
throw SafeOFStreamError("Write to fd " + stringify(buf.fd) + " failed");
}
-SafeOFStreamError::SafeOFStreamError(const std::string & s) throw () :
+SafeOFStreamError::SafeOFStreamError(const std::string & s) noexcept :
Exception(s)
{
}
diff --git a/paludis/util/safe_ofstream.hh b/paludis/util/safe_ofstream.hh
index 83b7eca38..a0ddce3ac 100644
--- a/paludis/util/safe_ofstream.hh
+++ b/paludis/util/safe_ofstream.hh
@@ -133,7 +133,7 @@ namespace paludis
public Exception
{
public:
- SafeOFStreamError(const std::string &) throw ();
+ SafeOFStreamError(const std::string &) noexcept;
};
extern template class Pimp<SafeOFStreamBuf>;
diff --git a/paludis/util/singleton_TEST.cc b/paludis/util/singleton_TEST.cc
index 25146e216..67c74e74c 100644
--- a/paludis/util/singleton_TEST.cc
+++ b/paludis/util/singleton_TEST.cc
@@ -112,7 +112,7 @@ namespace
int MyThreadedClass::instances = 0;
std::mutex MyThreadedClass::mutex;
- static void thread_func(void * * const p) throw ()
+ static void thread_func(void * * const p) noexcept
{
*p = MyThreadedClass::get_instance();
}
diff --git a/paludis/util/system.cc b/paludis/util/system.cc
index 394ef8c48..de4b52650 100644
--- a/paludis/util/system.cc
+++ b/paludis/util/system.cc
@@ -60,7 +60,7 @@ namespace
static pid_t paludis_pid PALUDIS_ATTRIBUTE((used)) = get_paludis_pid();
}
-GetenvError::GetenvError(const std::string & key) throw () :
+GetenvError::GetenvError(const std::string & key) noexcept :
Exception("Environment variable '" + key + "' not set")
{
}
diff --git a/paludis/util/system.hh b/paludis/util/system.hh
index 9d06640d6..f1b7114b2 100644
--- a/paludis/util/system.hh
+++ b/paludis/util/system.hh
@@ -49,7 +49,7 @@ namespace paludis
///\name Basic operations
///\{
- GetenvError(const std::string & key) throw ();
+ GetenvError(const std::string & key) noexcept;
///\}
};
diff --git a/paludis/util/thread_pool.cc b/paludis/util/thread_pool.cc
index dd9f5f9d7..cc4b175af 100644
--- a/paludis/util/thread_pool.cc
+++ b/paludis/util/thread_pool.cc
@@ -46,7 +46,7 @@ ThreadPool::~ThreadPool()
}
void
-ThreadPool::create_thread(const std::function<void () throw ()> & f)
+ThreadPool::create_thread(const std::function<void () noexcept> & f)
{
_imp->threads.emplace_back(f);
}
diff --git a/paludis/util/thread_pool.hh b/paludis/util/thread_pool.hh
index 9b450cb0f..0b554f451 100644
--- a/paludis/util/thread_pool.hh
+++ b/paludis/util/thread_pool.hh
@@ -59,7 +59,7 @@ namespace paludis
/**
* Create a new thread in our pool.
*/
- void create_thread(const std::function<void () throw ()> &);
+ void create_thread(const std::function<void () noexcept> &);
/**
* How many threads does our pool contain?
diff --git a/paludis/util/thread_pool_TEST.cc b/paludis/util/thread_pool_TEST.cc
index 3b51f2021..a49b3ba15 100644
--- a/paludis/util/thread_pool_TEST.cc
+++ b/paludis/util/thread_pool_TEST.cc
@@ -28,7 +28,7 @@ using namespace paludis;
namespace
{
- void make_one(int & b) throw ()
+ void make_one(int & b) noexcept
{
b = 1;
}
diff --git a/paludis/util/tokeniser.cc b/paludis/util/tokeniser.cc
index 96f45c161..d9e50e74a 100644
--- a/paludis/util/tokeniser.cc
+++ b/paludis/util/tokeniser.cc
@@ -21,7 +21,7 @@
using namespace paludis;
-TokeniserError::TokeniserError(const std::string & s, const std::string & msg) throw () :
+TokeniserError::TokeniserError(const std::string & s, const std::string & msg) noexcept :
Exception("When tokenising '" + s + "': " + msg)
{
}
diff --git a/paludis/util/tokeniser.hh b/paludis/util/tokeniser.hh
index d34d237a5..925674f80 100644
--- a/paludis/util/tokeniser.hh
+++ b/paludis/util/tokeniser.hh
@@ -226,7 +226,7 @@ namespace paludis
///\name Basic operations
///\{
- TokeniserError(const std::string & s, const std::string & msg) throw ();
+ TokeniserError(const std::string & s, const std::string & msg) noexcept;
///\}
};
diff --git a/paludis/util/wildcard_expander.cc b/paludis/util/wildcard_expander.cc
index 175a29261..bfa639608 100644
--- a/paludis/util/wildcard_expander.cc
+++ b/paludis/util/wildcard_expander.cc
@@ -53,7 +53,7 @@ namespace paludis
};
}
-WildcardExpansionError::WildcardExpansionError(const std::string & the_message) throw () :
+WildcardExpansionError::WildcardExpansionError(const std::string & the_message) noexcept :
FSError(the_message)
{
}
diff --git a/paludis/util/wildcard_expander.hh b/paludis/util/wildcard_expander.hh
index ff92387de..0e5fc4a63 100644
--- a/paludis/util/wildcard_expander.hh
+++ b/paludis/util/wildcard_expander.hh
@@ -34,7 +34,7 @@ namespace paludis
public FSError
{
public:
- WildcardExpansionError(const std::string & message) throw ();
+ WildcardExpansionError(const std::string & message) noexcept;
};
class PALUDIS_VISIBLE WildcardExpander :