Skip to content
Snippets Groups Projects
Commit ea84bb6e authored by Steven Murray's avatar Steven Murray
Browse files

Removed throw() from the common/exception directory

parent 15e36681
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
// constructor
// -----------------------------------------------------------------------------
cta::exception::AcceptConnectionInterrupted::AcceptConnectionInterrupted(
const time_t remainingTime) throw() :
const time_t remainingTime) :
cta::exception::Exception(),
m_remainingTime(remainingTime) {
......@@ -34,6 +34,6 @@ cta::exception::AcceptConnectionInterrupted::AcceptConnectionInterrupted(
// remainingTime()
// -----------------------------------------------------------------------------
time_t cta::exception::AcceptConnectionInterrupted::remainingTime() const
throw() {
{
return m_remainingTime;
}
......@@ -38,13 +38,13 @@ public:
* @param remainingTime The number of remaining seconds when
* castor::io::acceptConnection() was interrupted.
*/
AcceptConnectionInterrupted(const time_t remainingTime) throw();
AcceptConnectionInterrupted(const time_t remainingTime);
/**
* Returns the number of remaining seconds when
* castor::io::acceptConnection() was interrupted.
*/
time_t remainingTime() const throw();
time_t remainingTime() const;
private:
......
......@@ -27,7 +27,7 @@ namespace exception {
class EndOfFile: public cta::exception::Exception {
public:
EndOfFile(const std::string & w): cta::exception::Exception(w) {}
virtual ~EndOfFile() throw() {}
virtual ~EndOfFile() {}
};
}}
......@@ -28,7 +28,7 @@ namespace exception {
public:
Errnum(std::string what = "");
Errnum (int err, std::string what = "");
virtual ~Errnum() throw() {};
virtual ~Errnum() {};
int errorNumber() const { return m_errnum; }
std::string strError() const { return m_strerror; }
static void throwOnReturnedErrno(const int err, const std::string &context = "");
......
......@@ -50,7 +50,7 @@ cta::exception::Exception& cta::exception::Exception::operator=(
//------------------------------------------------------------------------------
// what operator
//------------------------------------------------------------------------------
const char * cta::exception::Exception::what() const throw () {
const char * cta::exception::Exception::what() const noexcept {
m_what = getMessageValue();
m_what += "\n";
m_what += (std::string) m_backtrace;
......@@ -60,7 +60,7 @@ const char * cta::exception::Exception::what() const throw () {
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
cta::exception::Exception::~Exception() throw() {
cta::exception::Exception::~Exception() {
}
//------------------------------------------------------------------------------
......
......@@ -55,7 +55,7 @@ public:
* Empty Destructor, explicitely non-throwing (needed for std::exception
* inheritance)
*/
virtual ~Exception() throw ();
virtual ~Exception();
/**
* Get the value of m_message
......@@ -96,7 +96,7 @@ public:
* the stack trace.
* @return pointer to m_what's contents
*/
virtual const char * what() const throw ();
virtual const char * what() const noexcept;
private:
/// A message explaining why this exception was raised
......
......@@ -46,7 +46,7 @@ namespace cta { namespace exception {
* Trivial, but explicitely non-throwing destructor (required through
* inheritence from std::exception)
*/
virtual ~InvalidConfigEntry() throw() {};
virtual ~InvalidConfigEntry() {};
/**
* Returns the category of the configuration entry.
......
......@@ -28,6 +28,6 @@ namespace exception {
class MemException: public cta::exception::Exception {
public:
MemException(const std::string & what): Exception(what) {}
virtual ~MemException() throw() {}
virtual ~MemException() {}
};
}}
......@@ -24,7 +24,7 @@
//------------------------------------------------------------------------------
cta::exception::NoPortInRange::NoPortInRange(
const unsigned short lowPort,
const unsigned short highPort) throw() :
const unsigned short highPort) :
cta::exception::Exception(),
m_lowPort(lowPort),
m_highPort(highPort) {
......@@ -36,7 +36,7 @@ cta::exception::NoPortInRange::NoPortInRange(
//------------------------------------------------------------------------------
// getLowPort()
//------------------------------------------------------------------------------
unsigned short cta::exception::NoPortInRange::getLowPort() throw() {
unsigned short cta::exception::NoPortInRange::getLowPort() {
return m_lowPort;
}
......@@ -44,6 +44,6 @@ unsigned short cta::exception::NoPortInRange::getLowPort() throw() {
//------------------------------------------------------------------------------
// getHighPort()
//------------------------------------------------------------------------------
unsigned short cta::exception::NoPortInRange::getHighPort() throw() {
unsigned short cta::exception::NoPortInRange::getHighPort() {
return m_highPort;
}
......@@ -40,23 +40,23 @@ public:
* @param highPort The inclusive high port of the port number range.
*/
NoPortInRange(const unsigned short lowPort, const unsigned short highPort)
throw();
;
/**
* Empty Destructor, explicitely non-throwing (needed for std::exception
* inheritance)
*/
virtual ~NoPortInRange() throw() {}
virtual ~NoPortInRange() {}
/**
* Returns the inclusive low port of the port number range.
*/
unsigned short getLowPort() throw();
unsigned short getLowPort();
/**
* Returns the inclusive high port of the port number range.
*/
unsigned short getHighPort() throw();
unsigned short getHighPort();
private:
......
......@@ -36,7 +36,7 @@ namespace exception {
class XrootCl: public cta::exception::Exception {
public:
XrootCl(const XrdCl::XRootDStatus & status, const std::string & context);
virtual ~XrootCl() throw() {};
virtual ~XrootCl() {};
const XrdCl::XRootDStatus & xRootDStatus() const { return m_status; }
static void throwOnError(const XrdCl::XRootDStatus & status, std::string context = "");
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment