Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated throw() #445

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions util/exception.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ template <class Except, class Data> typename Except::template ExceptionTag<Excep

class Exception : public std::exception {
public:
Exception() throw();
virtual ~Exception() throw();
Exception() noexcept;
virtual ~Exception() noexcept;

const char *what() const throw() { return what_.str().c_str(); }
const char *what() const noexcept { return what_.str().c_str(); }

// For use by the UTIL_THROW macros.
void SetLocation(
Expand Down Expand Up @@ -108,11 +108,11 @@ template <class Except, class Data> typename Except::template ExceptionTag<Excep
// Exception that records errno and adds it to the message.
class ErrnoException : public Exception {
public:
ErrnoException() throw();
ErrnoException() noexcept;

virtual ~ErrnoException() throw();
virtual ~ErrnoException() noexcept;

int Error() const throw() { return errno_; }
int Error() const noexcept { return errno_; }

private:
int errno_;
Expand All @@ -121,15 +121,15 @@ class ErrnoException : public Exception {
// file wasn't there, or couldn't be open for some reason
class FileOpenException : public Exception {
public:
FileOpenException() throw() {}
~FileOpenException() throw() {}
FileOpenException() noexcept {}
~FileOpenException() noexcept {}
};

// Utilities for overflow checking.
class OverflowException : public Exception {
public:
OverflowException() throw();
~OverflowException() throw();
OverflowException() noexcept;
~OverflowException() noexcept;
};

template <unsigned len> inline std::size_t CheckOverflowInternal(uint64_t value) {
Expand All @@ -149,8 +149,8 @@ inline std::size_t CheckOverflow(uint64_t value) {
/* Thrown for Windows specific operations. */
class WindowsException : public Exception {
public:
WindowsException() throw();
~WindowsException() throw();
WindowsException() noexcept;
~WindowsException() noexcept;
};
#endif

Expand Down
Loading