8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00

Replace throw() by noexcept.

This commit is contained in:
Adriano dos Santos Fernandes 2023-09-18 20:27:13 -03:00
parent 1d858667d8
commit 5d47a0ba7c
48 changed files with 329 additions and 329 deletions

View File

@ -1512,7 +1512,7 @@ MyPlugin : public ISomePluginImpl&lt;MyPlugin, CheckStatusWrapper&gt;</i></font>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt"><i>{</i></font></p>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt"><i>public:</i></font></p>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt"><i>explicit
MyPlugin(<a href="#PluginConfig">IPluginConfig</a>* cnf) throw()</i></font></p>
MyPlugin(<a href="#PluginConfig">IPluginConfig</a>* cnf) noexcept</i></font></p>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt"><i>:
config(cnf), refCounter(0), owner(NULL)</i></font></p>
<p style="margin-bottom: 0cm"><font size="4" style="font-size: 14pt"><i>{</i></font></p>

View File

@ -68,7 +68,7 @@ private:
class CryptKeyHolder : public IKeyHolderPluginImpl<CryptKeyHolder, CheckStatusWrapper>
{
public:
explicit CryptKeyHolder(IPluginConfig* cnf) throw()
explicit CryptKeyHolder(IPluginConfig* cnf) noexcept
: callbackInterface(this), named(NULL), tempStatus(master->getStatus()),
config(cnf), key(0), owner(NULL)
{

View File

@ -68,7 +68,7 @@ private:
class DbCrypt : public IDbCryptPluginImpl<DbCrypt, CheckStatusWrapper>
{
public:
explicit DbCrypt(IPluginConfig* cnf) throw()
explicit DbCrypt(IPluginConfig* cnf) noexcept
: config(cnf), key(0), refCounter(0), owner(NULL)
{
config->addRef();

View File

@ -163,7 +163,7 @@ public:
return ptr != r.ptr;
}
void clear() throw() // Used after detach/commit/close/etc., i.e. release() not needed
void clear() noexcept // Used after detach/commit/close/etc., i.e. release() not needed
{
ptr = NULL;
}

View File

@ -1106,7 +1106,7 @@ RestoreRelationTask::Item::EnsureUnlockBuffer::~EnsureUnlockBuffer()
/// class RestoreRelationTask::ExcReadDone
void RestoreRelationTask::ExcReadDone::stuffByException(StaticStatusVector& status) const throw()
void RestoreRelationTask::ExcReadDone::stuffByException(StaticStatusVector& status) const noexcept
{
ISC_STATUS sv[] = {isc_arg_gds, isc_random, isc_arg_string,
(ISC_STATUS)(IPTR) "Unexpected call to RestoreRelationTask::ExcReadDone::stuffException()", isc_arg_end};
@ -1121,7 +1121,7 @@ void RestoreRelationTask::ExcReadDone::stuffByException(StaticStatusVector& stat
}
}
const char* RestoreRelationTask::ExcReadDone::what() const throw()
const char* RestoreRelationTask::ExcReadDone::what() const noexcept
{
return "RestoreRelationTask::ExcReadDone";
}

View File

@ -400,9 +400,9 @@ public:
class ExcReadDone : public Firebird::Exception
{
public:
ExcReadDone() throw() : Firebird::Exception() { }
virtual void stuffByException(Firebird::StaticStatusVector& status_vector) const throw();
virtual const char* what() const throw();
ExcReadDone() noexcept : Firebird::Exception() { }
virtual void stuffByException(Firebird::StaticStatusVector& status_vector) const noexcept;
virtual const char* what() const noexcept;
static void raise();
};

View File

@ -113,7 +113,7 @@ unsigned makeDynamicStrings(unsigned length, ISC_STATUS* const dst, const ISC_ST
return (to - dst) - 1;
}
char* findDynamicStrings(unsigned length, ISC_STATUS* ptr) throw()
char* findDynamicStrings(unsigned length, ISC_STATUS* ptr) noexcept
{
while (length--)
{

View File

@ -35,7 +35,7 @@
namespace Firebird {
unsigned makeDynamicStrings(unsigned len, ISC_STATUS* const dst, const ISC_STATUS* const src);
char* findDynamicStrings(unsigned len, ISC_STATUS* ptr) throw();
char* findDynamicStrings(unsigned len, ISC_STATUS* ptr) noexcept;
} // namespace Firebird

View File

@ -80,7 +80,7 @@ public:
this->push(isc_arg_end);
}
ISC_STATUS* makeEmergencyStatus() throw()
ISC_STATUS* makeEmergencyStatus() noexcept
{
// Should not throw - see assertions in constructors
return this->getBuffer(3);

View File

@ -57,7 +57,7 @@ Base::Base(ISC_STATUS k, ISC_STATUS c) :
{
}
StatusVector::ImplStatusVector::ImplStatusVector(const ISC_STATUS* s) throw()
StatusVector::ImplStatusVector::ImplStatusVector(const ISC_STATUS* s) noexcept
: Base::ImplBase(0, 0),
m_status_vector(*getDefaultMemoryPool()),
m_strings(*getDefaultMemoryPool())
@ -71,7 +71,7 @@ StatusVector::ImplStatusVector::ImplStatusVector(const ISC_STATUS* s) throw()
append(s);
}
StatusVector::ImplStatusVector::ImplStatusVector(const IStatus* s) throw()
StatusVector::ImplStatusVector::ImplStatusVector(const IStatus* s) noexcept
: Base::ImplBase(0, 0),
m_status_vector(*getDefaultMemoryPool()),
m_strings(*getDefaultMemoryPool())
@ -86,7 +86,7 @@ StatusVector::ImplStatusVector::ImplStatusVector(const IStatus* s) throw()
append(s->getWarnings());
}
StatusVector::ImplStatusVector::ImplStatusVector(const Exception& ex) throw()
StatusVector::ImplStatusVector::ImplStatusVector(const Exception& ex) noexcept
: Base::ImplBase(0, 0),
m_status_vector(*getDefaultMemoryPool()),
m_strings(*getDefaultMemoryPool())
@ -122,7 +122,7 @@ StatusVector::StatusVector() :
{
}
void StatusVector::ImplStatusVector::clear() throw()
void StatusVector::ImplStatusVector::clear() noexcept
{
m_warning = 0;
m_status_vector.clear();
@ -130,18 +130,18 @@ void StatusVector::ImplStatusVector::clear() throw()
m_strings.erase();
}
bool StatusVector::ImplStatusVector::compare(const StatusVector& v) const throw()
bool StatusVector::ImplStatusVector::compare(const StatusVector& v) const noexcept
{
return length() == v.length() && fb_utils::cmpStatus(length(), value(), v.value());
}
void StatusVector::ImplStatusVector::assign(const StatusVector& v) throw()
void StatusVector::ImplStatusVector::assign(const StatusVector& v) noexcept
{
clear();
append(v);
}
void StatusVector::ImplStatusVector::assign(const Exception& ex) throw()
void StatusVector::ImplStatusVector::assign(const Exception& ex) noexcept
{
clear();
ex.stuffException(m_status_vector);
@ -194,7 +194,7 @@ void StatusVector::ImplStatusVector::setStrPointers(const char* oldBase)
}
}
void StatusVector::ImplStatusVector::append(const StatusVector& v) throw()
void StatusVector::ImplStatusVector::append(const StatusVector& v) noexcept
{
ImplStatusVector newVector(getKind(), getCode());
@ -210,7 +210,7 @@ void StatusVector::ImplStatusVector::append(const StatusVector& v) throw()
*this = newVector;
}
void StatusVector::ImplStatusVector::prepend(const StatusVector& v) throw()
void StatusVector::ImplStatusVector::prepend(const StatusVector& v) noexcept
{
ImplStatusVector newVector(getKind(), getCode());
@ -236,19 +236,19 @@ StatusVector::ImplStatusVector& StatusVector::ImplStatusVector::operator=(const
return *this;
}
bool StatusVector::ImplStatusVector::appendErrors(const ImplBase* const v) throw()
bool StatusVector::ImplStatusVector::appendErrors(const ImplBase* const v) noexcept
{
return append(v->value(), v->firstWarning() ? v->firstWarning() : v->length());
}
bool StatusVector::ImplStatusVector::appendWarnings(const ImplBase* const v) throw()
bool StatusVector::ImplStatusVector::appendWarnings(const ImplBase* const v) noexcept
{
if (! v->firstWarning())
return true;
return append(v->value() + v->firstWarning(), v->length() - v->firstWarning());
}
bool StatusVector::ImplStatusVector::append(const ISC_STATUS* const from, const unsigned int count) throw()
bool StatusVector::ImplStatusVector::append(const ISC_STATUS* const from, const unsigned int count) noexcept
{
// CVC: I didn't expect count to be zero but it's, in some calls
fb_assert(count >= 0);
@ -279,13 +279,13 @@ bool StatusVector::ImplStatusVector::append(const ISC_STATUS* const from, const
return copied == count;
}
void StatusVector::ImplStatusVector::append(const ISC_STATUS* const from) throw()
void StatusVector::ImplStatusVector::append(const ISC_STATUS* const from) noexcept
{
unsigned l = fb_utils::statusLength(from);
append(from, l + 1);
}
void StatusVector::ImplStatusVector::shiftLeft(const Base& arg) throw()
void StatusVector::ImplStatusVector::shiftLeft(const Base& arg) noexcept
{
m_status_vector[length()] = arg.getKind();
m_status_vector.push(arg.getCode());
@ -294,7 +294,7 @@ void StatusVector::ImplStatusVector::shiftLeft(const Base& arg) throw()
putStrArg(length() - 2);
}
void StatusVector::ImplStatusVector::shiftLeft(const Warning& arg) throw()
void StatusVector::ImplStatusVector::shiftLeft(const Warning& arg) noexcept
{
const int cur = m_warning ? 0 : length();
shiftLeft(*static_cast<const Base*>(&arg));
@ -302,17 +302,17 @@ void StatusVector::ImplStatusVector::shiftLeft(const Warning& arg) throw()
m_warning = cur;
}
void StatusVector::ImplStatusVector::shiftLeft(const char* text) throw()
void StatusVector::ImplStatusVector::shiftLeft(const char* text) noexcept
{
shiftLeft(Str(text));
}
void StatusVector::ImplStatusVector::shiftLeft(const AbstractString& text) throw()
void StatusVector::ImplStatusVector::shiftLeft(const AbstractString& text) noexcept
{
shiftLeft(Str(text));
}
void StatusVector::ImplStatusVector::shiftLeft(const MetaString& text) throw()
void StatusVector::ImplStatusVector::shiftLeft(const MetaString& text) noexcept
{
shiftLeft(Str(text));
}
@ -326,7 +326,7 @@ void StatusVector::raise() const
status_exception::raise(Gds(isc_random) << Str("Attempt to raise empty exception"));
}
ISC_STATUS StatusVector::ImplStatusVector::copyTo(ISC_STATUS* dest) const throw()
ISC_STATUS StatusVector::ImplStatusVector::copyTo(ISC_STATUS* dest) const noexcept
{
if (hasData())
{
@ -341,7 +341,7 @@ ISC_STATUS StatusVector::ImplStatusVector::copyTo(ISC_STATUS* dest) const throw(
return dest[1];
}
void StatusVector::ImplStatusVector::copyTo(IStatus* dest) const throw()
void StatusVector::ImplStatusVector::copyTo(IStatus* dest) const noexcept
{
dest->init();
if (hasData())
@ -361,7 +361,7 @@ void StatusVector::ImplStatusVector::copyTo(IStatus* dest) const throw()
}
}
void StatusVector::ImplStatusVector::appendTo(IStatus* dest) const throw()
void StatusVector::ImplStatusVector::appendTo(IStatus* dest) const noexcept
{
if (hasData())
{
@ -387,75 +387,75 @@ void StatusVector::ImplStatusVector::appendTo(IStatus* dest) const throw()
}
}
Gds::Gds(ISC_STATUS s) throw() :
Gds::Gds(ISC_STATUS s) noexcept :
StatusVector(isc_arg_gds, s) { }
PrivateDyn::PrivateDyn(ISC_STATUS codeWithoutFacility) throw() :
PrivateDyn::PrivateDyn(ISC_STATUS codeWithoutFacility) noexcept :
Gds(ENCODE_ISC_MSG(codeWithoutFacility, DYN_MSG_FAC)) { }
Num::Num(ISC_STATUS s) throw() :
Num::Num(ISC_STATUS s) noexcept :
Base(isc_arg_number, s) { }
Int64::Int64(SINT64 val) throw() :
Int64::Int64(SINT64 val) noexcept :
Str(text)
{
sprintf(text, "%" SQUADFORMAT, val);
}
Int64::Int64(FB_UINT64 val) throw() :
Int64::Int64(FB_UINT64 val) noexcept :
Str(text)
{
sprintf(text, "%" UQUADFORMAT, val);
}
Quad::Quad(const ISC_QUAD* quad) throw() :
Quad::Quad(const ISC_QUAD* quad) noexcept :
Str(text)
{
sprintf(text, "%x:%x", quad->gds_quad_high, quad->gds_quad_low);
}
Interpreted::Interpreted(const char* text) throw() :
Interpreted::Interpreted(const char* text) noexcept :
StatusVector(isc_arg_interpreted, (ISC_STATUS)(IPTR) text) { }
Interpreted::Interpreted(const AbstractString& text) throw() :
Interpreted::Interpreted(const AbstractString& text) noexcept :
StatusVector(isc_arg_interpreted, (ISC_STATUS)(IPTR) text.c_str()) { }
Unix::Unix(ISC_STATUS s) throw() :
Unix::Unix(ISC_STATUS s) noexcept :
Base(isc_arg_unix, s) { }
Mach::Mach(ISC_STATUS s) throw() :
Mach::Mach(ISC_STATUS s) noexcept :
Base(isc_arg_next_mach, s) { }
Windows::Windows(ISC_STATUS s) throw() :
Windows::Windows(ISC_STATUS s) noexcept :
Base(isc_arg_win32, s) { }
Warning::Warning(ISC_STATUS s) throw() :
Warning::Warning(ISC_STATUS s) noexcept :
StatusVector(isc_arg_warning, s) { }
// Str overloading.
Str::Str(const char* text) throw() :
Str::Str(const char* text) noexcept :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text) { }
Str::Str(const AbstractString& text) throw() :
Str::Str(const AbstractString& text) noexcept :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text.c_str()) { }
Str::Str(const MetaString& text) throw() :
Str::Str(const MetaString& text) noexcept :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text.c_str()) { }
SqlState::SqlState(const char* text) throw() :
SqlState::SqlState(const char* text) noexcept :
Base(isc_arg_sql_state, (ISC_STATUS)(IPTR) text) { }
SqlState::SqlState(const AbstractString& text) throw() :
SqlState::SqlState(const AbstractString& text) noexcept :
Base(isc_arg_sql_state, (ISC_STATUS)(IPTR) text.c_str()) { }
OsError::OsError() throw() :
OsError::OsError() noexcept :
#ifdef WIN_NT
Base(isc_arg_win32, GetLastError()) { }
#else
Base(isc_arg_unix, errno) { }
#endif
OsError::OsError(ISC_STATUS s) throw() :
OsError::OsError(ISC_STATUS s) noexcept :
#ifdef WIN_NT
Base(isc_arg_win32, s) { }
#else

View File

@ -60,43 +60,43 @@ protected:
ISC_STATUS kind, code;
public:
ISC_STATUS getKind() const throw() { return kind; }
ISC_STATUS getCode() const throw() { return code; }
ISC_STATUS getKind() const noexcept { return kind; }
ISC_STATUS getCode() const noexcept { return code; }
virtual const ISC_STATUS* value() const throw() { return NULL; }
virtual unsigned int length() const throw() { return 0; }
virtual unsigned int firstWarning() const throw() { return 0; }
virtual bool hasData() const throw() { return false; }
virtual void clear() throw() { }
virtual void append(const StatusVector&) throw() { }
virtual void prepend(const StatusVector&) throw() { }
virtual void assign(const StatusVector& ex) throw() { }
virtual void assign(const Exception& ex) throw() { }
virtual ISC_STATUS copyTo(ISC_STATUS*) const throw() { return 0; }
virtual void copyTo(IStatus*) const throw() { }
virtual void appendTo(IStatus*) const throw() { }
virtual const ISC_STATUS* value() const noexcept { return NULL; }
virtual unsigned int length() const noexcept { return 0; }
virtual unsigned int firstWarning() const noexcept { return 0; }
virtual bool hasData() const noexcept { return false; }
virtual void clear() noexcept { }
virtual void append(const StatusVector&) noexcept { }
virtual void prepend(const StatusVector&) noexcept { }
virtual void assign(const StatusVector& ex) noexcept { }
virtual void assign(const Exception& ex) noexcept { }
virtual ISC_STATUS copyTo(ISC_STATUS*) const noexcept { return 0; }
virtual void copyTo(IStatus*) const noexcept { }
virtual void appendTo(IStatus*) const noexcept { }
virtual void shiftLeft(const Base&) throw() { }
virtual void shiftLeft(const Warning&) throw() { }
virtual void shiftLeft(const char*) throw() { }
virtual void shiftLeft(const AbstractString&) throw() { }
virtual void shiftLeft(const MetaString&) throw() { }
virtual void shiftLeft(const Base&) noexcept { }
virtual void shiftLeft(const Warning&) noexcept { }
virtual void shiftLeft(const char*) noexcept { }
virtual void shiftLeft(const AbstractString&) noexcept { }
virtual void shiftLeft(const MetaString&) noexcept { }
virtual bool compare(const StatusVector& /*v*/) const throw() { return false; }
virtual bool compare(const StatusVector& /*v*/) const noexcept { return false; }
ImplBase(ISC_STATUS k, ISC_STATUS c) throw() : kind(k), code(c) { }
ImplBase(ISC_STATUS k, ISC_STATUS c) noexcept : kind(k), code(c) { }
virtual ~ImplBase() { }
};
Base(ISC_STATUS k, ISC_STATUS c);
explicit Base(ImplBase* i) throw() : implementation(i) { }
~Base() throw() { delete implementation; }
explicit Base(ImplBase* i) noexcept : implementation(i) { }
~Base() noexcept { delete implementation; }
ImplBase* const implementation;
public:
ISC_STATUS getKind() const throw() { return implementation->getKind(); }
ISC_STATUS getCode() const throw() { return implementation->getCode(); }
ISC_STATUS getKind() const noexcept { return implementation->getKind(); }
ISC_STATUS getCode() const noexcept { return implementation->getCode(); }
};
class StatusVector : public Base
@ -113,34 +113,34 @@ protected:
void putStrArg(unsigned startWith);
void setStrPointers(const char* oldBase);
bool appendErrors(const ImplBase* const v) throw();
bool appendWarnings(const ImplBase* const v) throw();
bool append(const ISC_STATUS* const from, const unsigned int count) throw();
void append(const ISC_STATUS* const from) throw();
bool appendErrors(const ImplBase* const v) noexcept;
bool appendWarnings(const ImplBase* const v) noexcept;
bool append(const ISC_STATUS* const from, const unsigned int count) noexcept;
void append(const ISC_STATUS* const from) noexcept;
ImplStatusVector& operator=(const ImplStatusVector& src);
public:
virtual const ISC_STATUS* value() const throw() { return m_status_vector.begin(); }
virtual unsigned int length() const throw() { return m_status_vector.getCount() - 1u; }
virtual unsigned int firstWarning() const throw() { return m_warning; }
virtual bool hasData() const throw() { return length() > 0u; }
virtual void clear() throw();
virtual void append(const StatusVector& v) throw();
virtual void prepend(const StatusVector& v) throw();
virtual void assign(const StatusVector& v) throw();
virtual void assign(const Exception& ex) throw();
virtual ISC_STATUS copyTo(ISC_STATUS* dest) const throw();
virtual void copyTo(IStatus* dest) const throw();
virtual void appendTo(IStatus* dest) const throw();
virtual void shiftLeft(const Base& arg) throw();
virtual void shiftLeft(const Warning& arg) throw();
virtual void shiftLeft(const char* text) throw();
virtual void shiftLeft(const AbstractString& text) throw();
virtual void shiftLeft(const MetaString& text) throw();
virtual bool compare(const StatusVector& v) const throw();
virtual const ISC_STATUS* value() const noexcept { return m_status_vector.begin(); }
virtual unsigned int length() const noexcept { return m_status_vector.getCount() - 1u; }
virtual unsigned int firstWarning() const noexcept { return m_warning; }
virtual bool hasData() const noexcept { return length() > 0u; }
virtual void clear() noexcept;
virtual void append(const StatusVector& v) noexcept;
virtual void prepend(const StatusVector& v) noexcept;
virtual void assign(const StatusVector& v) noexcept;
virtual void assign(const Exception& ex) noexcept;
virtual ISC_STATUS copyTo(ISC_STATUS* dest) const noexcept;
virtual void copyTo(IStatus* dest) const noexcept;
virtual void appendTo(IStatus* dest) const noexcept;
virtual void shiftLeft(const Base& arg) noexcept;
virtual void shiftLeft(const Warning& arg) noexcept;
virtual void shiftLeft(const char* text) noexcept;
virtual void shiftLeft(const AbstractString& text) noexcept;
virtual void shiftLeft(const MetaString& text) noexcept;
virtual bool compare(const StatusVector& v) const noexcept;
ImplStatusVector(ISC_STATUS k, ISC_STATUS c) throw()
ImplStatusVector(ISC_STATUS k, ISC_STATUS c) noexcept
: ImplBase(k, c),
m_status_vector(*getDefaultMemoryPool()),
m_strings(*getDefaultMemoryPool())
@ -148,9 +148,9 @@ protected:
clear();
}
explicit ImplStatusVector(const ISC_STATUS* s) throw();
explicit ImplStatusVector(const IStatus* s) throw();
explicit ImplStatusVector(const Exception& ex) throw();
explicit ImplStatusVector(const ISC_STATUS* s) noexcept;
explicit ImplStatusVector(const IStatus* s) noexcept;
explicit ImplStatusVector(const Exception& ex) noexcept;
};
StatusVector(ISC_STATUS k, ISC_STATUS v);
@ -162,67 +162,67 @@ public:
StatusVector();
~StatusVector() { }
const ISC_STATUS* value() const throw() { return implementation->value(); }
unsigned int length() const throw() { return implementation->length(); }
bool hasData() const throw() { return implementation->hasData(); }
bool isEmpty() const throw() { return !implementation->hasData(); }
const ISC_STATUS* value() const noexcept { return implementation->value(); }
unsigned int length() const noexcept { return implementation->length(); }
bool hasData() const noexcept { return implementation->hasData(); }
bool isEmpty() const noexcept { return !implementation->hasData(); }
void clear() throw() { implementation->clear(); }
void append(const StatusVector& v) throw() { implementation->append(v); }
void prepend(const StatusVector& v) throw() { implementation->prepend(v); }
void assign(const StatusVector& v) throw() { implementation->assign(v); }
void assign(const Exception& ex) throw() { implementation->assign(ex); }
void clear() noexcept { implementation->clear(); }
void append(const StatusVector& v) noexcept { implementation->append(v); }
void prepend(const StatusVector& v) noexcept { implementation->prepend(v); }
void assign(const StatusVector& v) noexcept { implementation->assign(v); }
void assign(const Exception& ex) noexcept { implementation->assign(ex); }
[[noreturn]] void raise() const;
ISC_STATUS copyTo(ISC_STATUS* dest) const throw() { return implementation->copyTo(dest); }
void copyTo(IStatus* dest) const throw() { implementation->copyTo(dest); }
void appendTo(IStatus* dest) const throw() { implementation->appendTo(dest); }
ISC_STATUS copyTo(ISC_STATUS* dest) const noexcept { return implementation->copyTo(dest); }
void copyTo(IStatus* dest) const noexcept { implementation->copyTo(dest); }
void appendTo(IStatus* dest) const noexcept { implementation->appendTo(dest); }
// generic argument insert
StatusVector& operator<<(const Base& arg) throw()
StatusVector& operator<<(const Base& arg) noexcept
{
implementation->shiftLeft(arg);
return *this;
}
// StatusVector case - append multiple args
StatusVector& operator<<(const StatusVector& arg) throw()
StatusVector& operator<<(const StatusVector& arg) noexcept
{
implementation->append(arg);
return *this;
}
// warning special case - to setup first warning location
StatusVector& operator<<(const Warning& arg) throw()
StatusVector& operator<<(const Warning& arg) noexcept
{
implementation->shiftLeft(arg);
return *this;
}
// Str special case - make the code simpler & better readable
StatusVector& operator<<(const char* text) throw()
StatusVector& operator<<(const char* text) noexcept
{
implementation->shiftLeft(text);
return *this;
}
StatusVector& operator<<(const AbstractString& text) throw()
StatusVector& operator<<(const AbstractString& text) noexcept
{
implementation->shiftLeft(text);
return *this;
}
StatusVector& operator<<(const MetaString& text) throw()
StatusVector& operator<<(const MetaString& text) noexcept
{
implementation->shiftLeft(text);
return *this;
}
bool operator==(const StatusVector& arg) const throw()
bool operator==(const StatusVector& arg) const noexcept
{
return implementation->compare(arg);
}
bool operator!=(const StatusVector& arg) const throw()
bool operator!=(const StatusVector& arg) const noexcept
{
return !(*this == arg);
}
@ -232,7 +232,7 @@ public:
class Gds : public StatusVector
{
public:
explicit Gds(ISC_STATUS s) throw();
explicit Gds(ISC_STATUS s) noexcept;
};
// To simplify calls to DYN messages from DSQL, only for private DYN messages
@ -240,21 +240,21 @@ public:
class PrivateDyn : public Gds
{
public:
explicit PrivateDyn(ISC_STATUS codeWithoutFacility) throw();
explicit PrivateDyn(ISC_STATUS codeWithoutFacility) noexcept;
};
class Str : public Base
{
public:
explicit Str(const char* text) throw();
explicit Str(const AbstractString& text) throw();
explicit Str(const MetaString& text) throw();
explicit Str(const char* text) noexcept;
explicit Str(const AbstractString& text) noexcept;
explicit Str(const MetaString& text) noexcept;
};
class Num : public Base
{
public:
explicit Num(ISC_STATUS s) throw();
explicit Num(ISC_STATUS s) noexcept;
};
// On 32-bit architecture ISC_STATUS can't fit 64-bit integer therefore
@ -264,8 +264,8 @@ public:
class Int64 : public Str
{
public:
explicit Int64(SINT64 val) throw();
explicit Int64(FB_UINT64 val) throw();
explicit Int64(SINT64 val) noexcept;
explicit Int64(FB_UINT64 val) noexcept;
private:
char text[24];
};
@ -273,7 +273,7 @@ private:
class Quad : public Str
{
public:
explicit Quad(const ISC_QUAD* quad) throw();
explicit Quad(const ISC_QUAD* quad) noexcept;
private:
// high : low \0
char text[8 + 1 + 8 + 1];
@ -282,46 +282,46 @@ private:
class Interpreted : public StatusVector
{
public:
explicit Interpreted(const char* text) throw();
explicit Interpreted(const AbstractString& text) throw();
explicit Interpreted(const char* text) noexcept;
explicit Interpreted(const AbstractString& text) noexcept;
};
class Unix : public Base
{
public:
explicit Unix(ISC_STATUS s) throw();
explicit Unix(ISC_STATUS s) noexcept;
};
class Mach : public Base
{
public:
explicit Mach(ISC_STATUS s) throw();
explicit Mach(ISC_STATUS s) noexcept;
};
class Windows : public Base
{
public:
explicit Windows(ISC_STATUS s) throw();
explicit Windows(ISC_STATUS s) noexcept;
};
class Warning : public StatusVector
{
public:
explicit Warning(ISC_STATUS s) throw();
explicit Warning(ISC_STATUS s) noexcept;
};
class SqlState : public Base
{
public:
explicit SqlState(const char* text) throw();
explicit SqlState(const AbstractString& text) throw();
explicit SqlState(const char* text) noexcept;
explicit SqlState(const AbstractString& text) noexcept;
};
class OsError : public Base
{
public:
OsError() throw();
explicit OsError(ISC_STATUS s) throw();
OsError() noexcept;
explicit OsError(ISC_STATUS s) noexcept;
};
} // namespace Arg

View File

@ -72,7 +72,7 @@ public:
fb_utils::init_status(this->getBuffer(3));
}
void save(unsigned int length, const ISC_STATUS* status, bool warningMode) throw()
void save(unsigned int length, const ISC_STATUS* status, bool warningMode) noexcept
{
try
{
@ -113,7 +113,7 @@ public:
}
}
ISC_STATUS save(const ISC_STATUS* status, bool warningMode = false) throw()
ISC_STATUS save(const ISC_STATUS* status, bool warningMode = false) noexcept
{
save(fb_utils::statusLength(status), status, warningMode);
return status[1];

View File

@ -60,7 +60,7 @@ public:
// the ContextPoolHolder for memory allocation.
// on modern systems, the default is to mask exceptions
FpeControl() throw()
FpeControl() noexcept
{
getCurrentMask(savedMask);
if (!areExceptionsMasked(savedMask))
@ -69,7 +69,7 @@ public:
}
}
~FpeControl() throw()
~FpeControl() noexcept
{
// change it back if necessary
if (!areExceptionsMasked(savedMask))
@ -79,7 +79,7 @@ public:
}
#if defined(WIN_NT)
static void maskAll() throw()
static void maskAll() noexcept
{
_clearfp(); // always call _clearfp() before setting control word
@ -95,12 +95,12 @@ private:
typedef unsigned int Mask;
Mask savedMask;
static bool areExceptionsMasked(const Mask& m) throw()
static bool areExceptionsMasked(const Mask& m) noexcept
{
return m == _CW_DEFAULT;
}
static void getCurrentMask(Mask& m) throw()
static void getCurrentMask(Mask& m) noexcept
{
#ifdef AMD64
m = _controlfp(0, 0);
@ -109,7 +109,7 @@ private:
#endif
}
void restoreMask() throw()
void restoreMask() noexcept
{
_clearfp(); // always call _clearfp() before setting control word
@ -122,7 +122,7 @@ private:
}
#elif defined(HAVE_FEGETENV)
static void maskAll() throw()
static void maskAll() noexcept
{
fesetenv(FE_DFL_ENV);
}
@ -146,18 +146,18 @@ private:
fenv_t savedMask;
static bool areExceptionsMasked(const fenv_t& m) throw()
static bool areExceptionsMasked(const fenv_t& m) noexcept
{
const static DefaultEnvironment defaultEnvironment;
return memcmp(&defaultEnvironment.clean, &m, sizeof(fenv_t)) == 0;
}
static void getCurrentMask(fenv_t& m) throw()
static void getCurrentMask(fenv_t& m) noexcept
{
fegetenv(&m);
}
void restoreMask() throw()
void restoreMask() noexcept
{
fesetenv(&savedMask);
}
@ -165,7 +165,7 @@ private:
// ok to remove this when Solaris 9 is no longer supported
// Solaris without fegetenv() implies Solaris 9 or older. In this case we
// have to use the Solaris FPE routines.
static void maskAll() throw()
static void maskAll() noexcept
{
fpsetmask(~(FP_X_OFL | FP_X_INV | FP_X_UFL | FP_X_DZ | FP_X_IMP));
}
@ -190,18 +190,18 @@ private:
fp_except savedMask;
static bool areExceptionsMasked(const fp_except& m) throw()
static bool areExceptionsMasked(const fp_except& m) noexcept
{
const static DefaultEnvironment defaultEnvironment;
return memcmp(&defaultEnvironment.clean, &m, sizeof(fp_except)) == 0;
}
static void getCurrentMask(fp_except& m) throw()
static void getCurrentMask(fp_except& m) noexcept
{
m = fpgetmask();
}
void restoreMask() throw()
void restoreMask() noexcept
{
fpsetsticky(0); // clear exception sticky flags
fpsetmask(savedMask);

View File

@ -49,7 +49,7 @@ const ISC_TIMESTAMP NoThrowTimeStamp::MAX_TIMESTAMP =
const ISC_TIME NoThrowTimeStamp::POW_10_TABLE[] =
{1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
NoThrowTimeStamp NoThrowTimeStamp::getCurrentTimeStamp(const char** error) throw()
NoThrowTimeStamp NoThrowTimeStamp::getCurrentTimeStamp(const char** error) noexcept
{
if (error)
*error = NULL;
@ -148,7 +148,7 @@ NoThrowTimeStamp NoThrowTimeStamp::getCurrentTimeStamp(const char** error) throw
return result;
}
int NoThrowTimeStamp::yday(const struct tm* times) throw()
int NoThrowTimeStamp::yday(const struct tm* times) noexcept
{
// Convert a calendar date to the day-of-year.
//
@ -175,7 +175,7 @@ int NoThrowTimeStamp::yday(const struct tm* times) throw()
}
void NoThrowTimeStamp::decode_date(ISC_DATE nday, struct tm* times) throw()
void NoThrowTimeStamp::decode_date(ISC_DATE nday, struct tm* times) noexcept
{
// Convert a numeric day to [day, month, year].
//
@ -232,7 +232,7 @@ void NoThrowTimeStamp::decode_date(ISC_DATE nday, struct tm* times) throw()
}
ISC_DATE NoThrowTimeStamp::encode_date(const struct tm* times) throw()
ISC_DATE NoThrowTimeStamp::encode_date(const struct tm* times) noexcept
{
// Convert a calendar date to a numeric day
// (the number of days since the base date)
@ -257,7 +257,7 @@ ISC_DATE NoThrowTimeStamp::encode_date(const struct tm* times) throw()
(153 * month + 2) / 5 + day + 1721119 - 2400001);
}
void NoThrowTimeStamp::decode_time(ISC_TIME ntime, int* hours, int* minutes, int* seconds, int* fractions) throw()
void NoThrowTimeStamp::decode_time(ISC_TIME ntime, int* hours, int* minutes, int* seconds, int* fractions) noexcept
{
fb_assert(hours);
fb_assert(minutes);
@ -275,20 +275,20 @@ void NoThrowTimeStamp::decode_time(ISC_TIME ntime, int* hours, int* minutes, int
}
}
ISC_TIME NoThrowTimeStamp::encode_time(int hours, int minutes, int seconds, int fractions) throw()
ISC_TIME NoThrowTimeStamp::encode_time(int hours, int minutes, int seconds, int fractions) noexcept
{
fb_assert(fractions >= 0 && fractions < ISC_TIME_SECONDS_PRECISION);
return ((hours * 60 + minutes) * 60 + seconds) * ISC_TIME_SECONDS_PRECISION + fractions;
}
void NoThrowTimeStamp::decode_timestamp(const ISC_TIMESTAMP ts, struct tm* times, int* fractions) throw()
void NoThrowTimeStamp::decode_timestamp(const ISC_TIMESTAMP ts, struct tm* times, int* fractions) noexcept
{
decode_date(ts.timestamp_date, times);
decode_time(ts.timestamp_time, &times->tm_hour, &times->tm_min, &times->tm_sec, fractions);
}
ISC_TIMESTAMP NoThrowTimeStamp::encode_timestamp(const struct tm* times, const int fractions) throw()
ISC_TIMESTAMP NoThrowTimeStamp::encode_timestamp(const struct tm* times, const int fractions) noexcept
{
fb_assert(fractions >= 0 && fractions < ISC_TIME_SECONDS_PRECISION);

View File

@ -117,7 +117,7 @@ public:
}
// Assign current date/time to the timestamp
void validate() throw()
void validate() noexcept
{
if (isEmpty())
{
@ -138,7 +138,7 @@ public:
const ISC_TIMESTAMP& value() const { return mValue; }
// Return current timestamp value
static NoThrowTimeStamp getCurrentTimeStamp(const char** error) throw();
static NoThrowTimeStamp getCurrentTimeStamp(const char** error) noexcept;
// Validation routines
static bool isValidDate(const ISC_DATE ndate)
@ -157,18 +157,18 @@ public:
}
// ISC date/time helper routines
static ISC_DATE encode_date(const struct tm* times) throw();
static ISC_TIME encode_time(int hours, int minutes, int seconds, int fractions = 0) throw();
static ISC_TIMESTAMP encode_timestamp(const struct tm* times, const int fractions = 0) throw();
static ISC_DATE encode_date(const struct tm* times) noexcept;
static ISC_TIME encode_time(int hours, int minutes, int seconds, int fractions = 0) noexcept;
static ISC_TIMESTAMP encode_timestamp(const struct tm* times, const int fractions = 0) noexcept;
static void decode_date(ISC_DATE nday, struct tm* times) throw();
static void decode_time(ISC_TIME ntime, int* hours, int* minutes, int* seconds, int* fractions = NULL) throw();
static void decode_timestamp(const ISC_TIMESTAMP ntimestamp, struct tm* times, int* fractions = NULL) throw();
static void decode_date(ISC_DATE nday, struct tm* times) noexcept;
static void decode_time(ISC_TIME ntime, int* hours, int* minutes, int* seconds, int* fractions = NULL) noexcept;
static void decode_timestamp(const ISC_TIMESTAMP ntimestamp, struct tm* times, int* fractions = NULL) noexcept;
static void add10msec(ISC_TIMESTAMP* v, SINT64 msec, SINT64 multiplier);
static void round_time(ISC_TIME& ntime, const int precision);
static inline bool isLeapYear(const int year) throw()
static inline bool isLeapYear(const int year) noexcept
{
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
}
@ -191,7 +191,7 @@ public:
private:
ISC_TIMESTAMP mValue;
static int yday(const struct tm* times) throw();
static int yday(const struct tm* times) noexcept;
};
} // namespace Firebird

View File

@ -165,7 +165,7 @@ public:
SafeArg& operator<<(void* c);
void dump(const TEXT* target[], FB_SIZE_T v_size) const;
const safe_cell& getCell(FB_SIZE_T index) const;
FB_SIZE_T getCount() const throw();
FB_SIZE_T getCount() const noexcept;
private:
FB_SIZE_T m_count;
@ -188,7 +188,7 @@ inline SafeArg& SafeArg::clear()
return *this;
}
inline FB_SIZE_T SafeArg::getCount() const throw()
inline FB_SIZE_T SafeArg::getCount() const noexcept
{
return m_count;
}

View File

@ -134,19 +134,19 @@ public:
freeData();
}
void clear() throw()
void clear() noexcept
{
count = 0;
}
protected:
const T& getElement(size_type index) const throw()
const T& getElement(size_type index) const noexcept
{
fb_assert(index < count);
return data[index];
}
T& getElement(size_type index) throw()
T& getElement(size_type index) noexcept
{
fb_assert(index < count);
return data[index];
@ -174,12 +174,12 @@ public:
return *this;
}
const T& operator[](size_type index) const throw()
const T& operator[](size_type index) const noexcept
{
return getElement(index);
}
T& operator[](size_type index) throw()
T& operator[](size_type index) noexcept
{
return getElement(index);
}
@ -266,14 +266,14 @@ public:
count += itemsCount;
}
T* remove(const size_type index) throw()
T* remove(const size_type index) noexcept
{
fb_assert(index < count);
memmove(data + index, data + index + 1, sizeof(T) * (--count - index));
return &data[index];
}
T* removeRange(const size_type from, const size_type to) throw()
T* removeRange(const size_type from, const size_type to) noexcept
{
fb_assert(from <= to);
fb_assert(to <= count);
@ -282,7 +282,7 @@ public:
return &data[from];
}
T* removeCount(const size_type index, const size_type n) throw()
T* removeCount(const size_type index, const size_type n) noexcept
{
fb_assert(index + n <= count);
memmove(data + index, data + index + n, sizeof(T) * (count - index - n));
@ -290,7 +290,7 @@ public:
return &data[index];
}
T* remove(T* itr) throw()
T* remove(T* itr) noexcept
{
const size_type index = itr - begin();
fb_assert(index < count);
@ -298,12 +298,12 @@ public:
return &data[index];
}
T* remove(T* itrFrom, T* itrTo) throw()
T* remove(T* itrFrom, T* itrTo) noexcept
{
return removeRange(itrFrom - begin(), itrTo - begin());
}
void shrink(size_type newCount) throw()
void shrink(size_type newCount) noexcept
{
fb_assert(newCount <= count);
count = newCount;
@ -363,7 +363,7 @@ public:
memcpy(data, items, sizeof(T) * count);
}
size_type getCount() const throw() { return count; }
size_type getCount() const noexcept { return count; }
bool isEmpty() const { return count == 0; }

View File

@ -126,7 +126,7 @@ namespace Firebird
memset(stringBuffer, c, sizeL);
}
void AbstractString::adjustRange(const size_type length, size_type& pos, size_type& n) throw()
void AbstractString::adjustRange(const size_type length, size_type& pos, size_type& n) noexcept
{
if (pos == npos) {
pos = length > n ? length - n : 0;
@ -171,7 +171,7 @@ namespace Firebird
return stringBuffer + p0;
}
void AbstractString::baseErase(size_type p0, size_type n) throw()
void AbstractString::baseErase(size_type p0, size_type n) noexcept
{
adjustRange(length(), p0, n);
memmove(stringBuffer + p0, stringBuffer + p0 + n, stringLength - (p0 + n) + 1);

View File

@ -153,7 +153,7 @@ namespace Firebird
stringBuffer[stringLength] = 0;
}
void shrinkBuffer() throw()
void shrinkBuffer() noexcept
{
// Shrink buffer if we decide it is beneficial
}
@ -209,7 +209,7 @@ namespace Firebird
}
// Trim the range making sure that it fits inside specified length
static void adjustRange(const size_type length, size_type& pos, size_type& n) throw();
static void adjustRange(const size_type length, size_type& pos, size_type& n) noexcept;
pointer baseAssign(const size_type n);
@ -217,7 +217,7 @@ namespace Firebird
pointer baseInsert(const size_type p0, const size_type n);
void baseErase(size_type p0, size_type n) throw();
void baseErase(size_type p0, size_type n) noexcept;
enum TrimType {TrimLeft, TrimRight, TrimBoth};
@ -237,7 +237,7 @@ namespace Firebird
{
return stringLength;
}
size_type getCount() const throw()
size_type getCount() const noexcept
{
return stringLength;
}
@ -523,22 +523,22 @@ namespace Firebird
insert(it - c_str(), first, last - first);
}
AbstractString& erase(size_type p0 = 0, size_type n = npos) throw()
AbstractString& erase(size_type p0 = 0, size_type n = npos) noexcept
{
baseErase(p0, n);
return *this;
}
AbstractString& clear() throw()
AbstractString& clear() noexcept
{
erase();
return *this;
}
iterator erase(iterator it) throw()
iterator erase(iterator it) noexcept
{
erase(it - c_str(), 1);
return it;
}
iterator erase(iterator first, iterator last) throw()
iterator erase(iterator first, iterator last) noexcept
{
erase(first - c_str(), last - first);
return first;

View File

@ -147,15 +147,15 @@ public:
FB_NEW InstanceControl::InstanceLink<GlobalPtr, P>(this);
}
T* operator->() throw()
T* operator->() noexcept
{
return instance;
}
operator T&() throw()
operator T&() noexcept
{
return *instance;
}
T* operator&() throw()
T* operator&() noexcept
{
return instance;
}

View File

@ -377,7 +377,7 @@ namespace Firebird
delete getPointer(i);
}
size_type getCount() const throw()
size_type getCount() const noexcept
{
return inherited::getCount();
}
@ -768,7 +768,7 @@ namespace Firebird
PointersArray() : values(), pointers() { }
~PointersArray() { }
size_type getCount() const throw()
size_type getCount() const noexcept
{
fb_assert(values.getCount() == pointers.getCount());
return values.getCount();

View File

@ -655,7 +655,7 @@ namespace Firebird {
}
}
FB_SIZE_T getCount() const throw()
FB_SIZE_T getCount() const noexcept
{
FB_SIZE_T rc = 0;
for (Entry* entry = stk; entry; entry = entry->next)

View File

@ -42,26 +42,26 @@ class Vector
public:
Vector() : count(0) {}
T& operator[](FB_SIZE_T index) throw()
T& operator[](FB_SIZE_T index) noexcept
{
fb_assert(index < count);
return data[index];
}
const T& operator[](FB_SIZE_T index) const throw()
const T& operator[](FB_SIZE_T index) const noexcept
{
fb_assert(index < count);
return data[index];
}
T* begin() throw() { return data; }
T* end() throw() { return data + count; }
const T* begin() const throw() { return data; }
const T* end() const throw() { return data + count; }
bool hasData() const throw() { return (count != 0); }
FB_SIZE_T getCount() const throw() { return count; }
FB_SIZE_T getCapacity() const throw() { return Capacity; }
void clear() throw() { count = 0; }
T* begin() noexcept { return data; }
T* end() noexcept { return data + count; }
const T* begin() const noexcept { return data; }
const T* end() const noexcept { return data + count; }
bool hasData() const noexcept { return (count != 0); }
FB_SIZE_T getCount() const noexcept { return count; }
FB_SIZE_T getCapacity() const noexcept { return Capacity; }
void clear() noexcept { count = 0; }
void insert(FB_SIZE_T index, const T& item)
{
@ -78,14 +78,14 @@ public:
return ++count;
}
T* remove(FB_SIZE_T index) throw()
T* remove(FB_SIZE_T index) noexcept
{
fb_assert(index < count);
memmove(data + index, data + index + 1, sizeof(T) * (--count - index));
return &data[index];
}
T* removeCount(const FB_SIZE_T index, const FB_SIZE_T n) throw()
T* removeCount(const FB_SIZE_T index, const FB_SIZE_T n) noexcept
{
fb_assert(index + n <= count);
memmove(data + index, data + index + n, sizeof(T) * (count - index - n));
@ -93,13 +93,13 @@ public:
return &data[index];
}
void shrink(FB_SIZE_T newCount) throw()
void shrink(FB_SIZE_T newCount) noexcept
{
fb_assert(newCount <= count);
count = newCount;
}
void join(const Vector<T, Capacity>& L) throw()
void join(const Vector<T, Capacity>& L) noexcept
{
fb_assert(count + L.count <= Capacity);
memcpy(data + count, L.data, sizeof(T) * L.count);
@ -107,7 +107,7 @@ public:
}
// prepare vector to be used as a buffer of capacity items
T* getBuffer(FB_SIZE_T capacityL) throw()
T* getBuffer(FB_SIZE_T capacityL) noexcept
{
fb_assert(capacityL <= Capacity);
count = capacityL;

View File

@ -16,9 +16,9 @@ namespace Firebird {
// ********************************* Exception *******************************
Exception::~Exception() throw() { }
Exception::~Exception() noexcept { }
void Exception::stuffException(DynamicStatusVector& status_vector) const throw()
void Exception::stuffException(DynamicStatusVector& status_vector) const noexcept
{
StaticStatusVector status;
stuffException(status);
@ -34,14 +34,14 @@ void Exception::stuffException(DynamicStatusVector& status_vector) const throw()
}
}
void Exception::stuffException(CheckStatusWrapper* status_vector) const throw()
void Exception::stuffException(CheckStatusWrapper* status_vector) const noexcept
{
StaticStatusVector status;
stuffException(status);
fb_utils::setIStatus(status_vector, status.begin());
}
void Exception::processUnexpectedException(ISC_STATUS* vector) throw()
void Exception::processUnexpectedException(ISC_STATUS* vector) noexcept
{
// do not use stuffException() here to avoid endless loop
try
@ -62,13 +62,13 @@ void Exception::processUnexpectedException(ISC_STATUS* vector) throw()
// ********************************* status_exception *******************************
status_exception::status_exception() throw()
status_exception::status_exception() noexcept
: m_status_vector(m_buffer)
{
fb_utils::init_status(m_status_vector);
}
status_exception::status_exception(const ISC_STATUS *status_vector) throw()
status_exception::status_exception(const ISC_STATUS *status_vector) noexcept
: m_status_vector(m_buffer)
{
fb_utils::init_status(m_status_vector);
@ -79,7 +79,7 @@ status_exception::status_exception(const ISC_STATUS *status_vector) throw()
}
}
status_exception::status_exception(const status_exception& from) throw()
status_exception::status_exception(const status_exception& from) noexcept
: m_status_vector(m_buffer)
{
fb_utils::init_status(m_status_vector);
@ -87,7 +87,7 @@ status_exception::status_exception(const status_exception& from) throw()
set_status(from.m_status_vector);
}
void status_exception::set_status(const ISC_STATUS *new_vector) throw()
void status_exception::set_status(const ISC_STATUS *new_vector) noexcept
{
fb_assert(new_vector != 0);
unsigned len = fb_utils::statusLength(new_vector);
@ -112,7 +112,7 @@ void status_exception::set_status(const ISC_STATUS *new_vector) throw()
}
}
status_exception::~status_exception() throw()
status_exception::~status_exception() noexcept
{
delete[] findDynamicStrings(fb_utils::statusLength(m_status_vector), m_status_vector);
if (m_status_vector != m_buffer)
@ -121,7 +121,7 @@ status_exception::~status_exception() throw()
}
}
const char* status_exception::what() const throw()
const char* status_exception::what() const noexcept
{
return "Firebird::status_exception";
}
@ -143,7 +143,7 @@ void status_exception::raise(const Arg::StatusVector& statusVector)
throw status_exception(statusVector.value());
}
void status_exception::stuffByException(StaticStatusVector& status) const throw()
void status_exception::stuffByException(StaticStatusVector& status) const noexcept
{
try
{
@ -162,12 +162,12 @@ void BadAlloc::raise()
throw BadAlloc();
}
void BadAlloc::stuffByException(StaticStatusVector& status) const throw()
void BadAlloc::stuffByException(StaticStatusVector& status) const noexcept
{
fb_utils::statusBadAlloc(status.makeEmergencyStatus());
}
const char* BadAlloc::what() const throw()
const char* BadAlloc::what() const noexcept
{
return "Firebird::BadAlloc";
}
@ -179,7 +179,7 @@ void LongJump::raise()
throw LongJump();
}
void LongJump::stuffByException(StaticStatusVector& status) const throw()
void LongJump::stuffByException(StaticStatusVector& status) const noexcept
{
ISC_STATUS sv[] = {isc_arg_gds, isc_random, isc_arg_string,
(ISC_STATUS)(IPTR) "Unexpected call to Firebird::LongJump::stuffException()", isc_arg_end};
@ -194,7 +194,7 @@ void LongJump::stuffByException(StaticStatusVector& status) const throw()
}
}
const char* LongJump::what() const throw()
const char* LongJump::what() const noexcept
{
return "Firebird::LongJump";
}
@ -286,7 +286,7 @@ fatal_exception::fatal_exception(const char* message) :
// Keep in sync with the constructor above, please; "message" becomes 4th element
// after initialization of status vector in constructor.
const char* fatal_exception::what() const throw()
const char* fatal_exception::what() const noexcept
{
return reinterpret_cast<const char*>(value()[3]);
}

View File

@ -88,7 +88,7 @@ public:
value.assign(newValue, len);
}
void clear() throw()
void clear() noexcept
{
e = s = 0;
value.erase(); // should not call allocation function - no throw
@ -142,7 +142,7 @@ public:
value = newValue;
}
void clear() throw()
void clear() noexcept
{
e = s = 0;
value = 0;
@ -235,7 +235,7 @@ public:
class StackUserData final : public UserData
{
public:
void* operator new(size_t, void* memory) throw()
void* operator new(size_t, void* memory) noexcept
{
return memory;
}

View File

@ -1326,7 +1326,7 @@ Firebird::PathName getPrefix(unsigned int prefType, const char* name)
}
unsigned int copyStatus(ISC_STATUS* const to, const unsigned int space,
const ISC_STATUS* const from, const unsigned int count) throw()
const ISC_STATUS* const from, const unsigned int count) noexcept
{
unsigned int copied = 0;
@ -1351,7 +1351,7 @@ unsigned int copyStatus(ISC_STATUS* const to, const unsigned int space,
}
unsigned int mergeStatus(ISC_STATUS* const dest, unsigned int space,
const Firebird::IStatus* from) throw()
const Firebird::IStatus* from) noexcept
{
const ISC_STATUS* s;
unsigned int copied = 0;
@ -1386,7 +1386,7 @@ unsigned int mergeStatus(ISC_STATUS* const dest, unsigned int space,
return copied;
}
void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from) throw()
void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from) noexcept
{
to->init();
@ -1397,7 +1397,7 @@ void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from)
to->setWarnings(from->getWarnings());
}
void setIStatus(Firebird::CheckStatusWrapper* to, const ISC_STATUS* from) throw()
void setIStatus(Firebird::CheckStatusWrapper* to, const ISC_STATUS* from) noexcept
{
try
{
@ -1419,7 +1419,7 @@ void setIStatus(Firebird::CheckStatusWrapper* to, const ISC_STATUS* from) throw(
}
}
unsigned int statusLength(const ISC_STATUS* const status) throw()
unsigned int statusLength(const ISC_STATUS* const status) noexcept
{
unsigned int l = 0;
for(;;)
@ -1432,7 +1432,7 @@ unsigned int statusLength(const ISC_STATUS* const status) throw()
}
}
bool cmpStatus(unsigned int len, const ISC_STATUS* a, const ISC_STATUS* b) throw()
bool cmpStatus(unsigned int len, const ISC_STATUS* a, const ISC_STATUS* b) noexcept
{
for (unsigned i = 0; i < len; )
{
@ -1480,7 +1480,7 @@ bool cmpStatus(unsigned int len, const ISC_STATUS* a, const ISC_STATUS* b) throw
}
unsigned int subStatus(const ISC_STATUS* in, unsigned int cin,
const ISC_STATUS* sub, unsigned int csub) throw()
const ISC_STATUS* sub, unsigned int csub) noexcept
{
for (unsigned pos = 0; csub <= cin - pos; )
{
@ -1767,7 +1767,7 @@ unsigned sqlTypeToDsc(unsigned runOffset, unsigned sqlType, unsigned sqlLength,
return runOffset + sizeof(SSHORT);
}
const ISC_STATUS* nextCode(const ISC_STATUS* v) throw()
const ISC_STATUS* nextCode(const ISC_STATUS* v) noexcept
{
do
{

View File

@ -160,22 +160,22 @@ namespace fb_utils
}
unsigned int copyStatus(ISC_STATUS* const to, const unsigned int space,
const ISC_STATUS* const from, const unsigned int count) throw();
void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from) throw();
unsigned int mergeStatus(ISC_STATUS* const to, unsigned int space, const Firebird::IStatus* from) throw();
void setIStatus(Firebird::CheckStatusWrapper* to, const ISC_STATUS* from) throw();
unsigned int statusLength(const ISC_STATUS* const status) throw();
const ISC_STATUS* const from, const unsigned int count) noexcept;
void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from) noexcept;
unsigned int mergeStatus(ISC_STATUS* const to, unsigned int space, const Firebird::IStatus* from) noexcept;
void setIStatus(Firebird::CheckStatusWrapper* to, const ISC_STATUS* from) noexcept;
unsigned int statusLength(const ISC_STATUS* const status) noexcept;
unsigned int subStatus(const ISC_STATUS* in, unsigned int cin,
const ISC_STATUS* sub, unsigned int csub) throw();
bool cmpStatus(unsigned int len, const ISC_STATUS* a, const ISC_STATUS* b) throw();
const ISC_STATUS* nextCode(const ISC_STATUS* v) throw();
const ISC_STATUS* sub, unsigned int csub) noexcept;
bool cmpStatus(unsigned int len, const ISC_STATUS* a, const ISC_STATUS* b) noexcept;
const ISC_STATUS* nextCode(const ISC_STATUS* v) noexcept;
inline unsigned nextArg(const ISC_STATUS v) throw()
inline unsigned nextArg(const ISC_STATUS v) noexcept
{
return v == isc_arg_cstring ? 3 : 2;
}
inline bool isStr(const ISC_STATUS v) throw()
inline bool isStr(const ISC_STATUS v) noexcept
{
switch (v)
{

View File

@ -167,7 +167,7 @@ Attachment* DsqlBatch::getAttachment() const
return m_dsqlRequest->req_dbb->dbb_attachment;
}
void DsqlBatch::setInterfacePtr(JBatch* interfacePtr) throw()
void DsqlBatch::setInterfacePtr(JBatch* interfacePtr) noexcept
{
fb_assert(!m_batch);
m_batch = interfacePtr;

View File

@ -65,7 +65,7 @@ public:
unsigned parLength, const UCHAR* par);
Attachment* getAttachment() const;
void setInterfacePtr(JBatch* interfacePtr) throw();
void setInterfacePtr(JBatch* interfacePtr) noexcept;
void add(thread_db* tdbb, ULONG count, const void* inBuffer);
void addBlob(thread_db* tdbb, ULONG length, const void* inBuffer, ISC_QUAD* blobId, unsigned parLength, const unsigned char* par);

View File

@ -60,7 +60,7 @@ Attachment* DsqlCursor::getAttachment() const
return m_dsqlRequest->req_dbb->dbb_attachment;
}
void DsqlCursor::setInterfacePtr(JResultSet* interfacePtr) throw()
void DsqlCursor::setInterfacePtr(JResultSet* interfacePtr) noexcept
{
fb_assert(!m_resultSet);
m_resultSet = interfacePtr;

View File

@ -40,7 +40,7 @@ public:
jrd_tra* getTransaction() const;
Attachment* getAttachment() const;
void setInterfacePtr(JResultSet* interfacePtr) throw();
void setInterfacePtr(JResultSet* interfacePtr) noexcept;
static void close(thread_db* tdbb, DsqlCursor* cursor);

View File

@ -1624,7 +1624,7 @@ public:
{
fb_utils::copy_terminate(msg, errmsg, sizeof(msg));
}
const char* what() const throw()
const char* what() const noexcept
{
return msg[0] ? msg : "gpre_exception";
}

View File

@ -48,43 +48,43 @@ typedef SimpleStatusVector<> StaticStatusVector;
class Exception
{
protected:
Exception() throw() { }
static void processUnexpectedException(ISC_STATUS* vector) throw();
Exception() noexcept { }
static void processUnexpectedException(ISC_STATUS* vector) noexcept;
public:
void stuffException(StaticStatusVector& status_vector) const throw()
void stuffException(StaticStatusVector& status_vector) const noexcept
{
stuffByException(status_vector);
}
void stuffException(DynamicStatusVector& status_vector) const throw();
void stuffException(CheckStatusWrapper* status_vector) const throw();
virtual ~Exception() throw();
void stuffException(DynamicStatusVector& status_vector) const noexcept;
void stuffException(CheckStatusWrapper* status_vector) const noexcept;
virtual ~Exception() noexcept;
private:
virtual void stuffByException(StaticStatusVector& status_vector) const throw() = 0;
virtual void stuffByException(StaticStatusVector& status_vector) const noexcept = 0;
public:
virtual const char* what() const throw() = 0;
virtual const char* what() const noexcept = 0;
};
// Used as jmpbuf to unwind when needed
class LongJump : public Exception
{
public:
virtual void stuffByException(StaticStatusVector& status_vector) const throw();
virtual const char* what() const throw();
virtual void stuffByException(StaticStatusVector& status_vector) const noexcept;
virtual const char* what() const noexcept;
static void raise();
LongJump() throw() : Exception() { }
LongJump() noexcept : Exception() { }
};
// Used in MemoryPool
class BadAlloc : public std::bad_alloc, public Exception
{
public:
BadAlloc() throw() : std::bad_alloc(), Exception() { }
virtual void stuffByException(StaticStatusVector& status_vector) const throw();
virtual const char* what() const throw();
BadAlloc() noexcept : std::bad_alloc(), Exception() { }
virtual void stuffByException(StaticStatusVector& status_vector) const noexcept;
virtual const char* what() const noexcept;
static void raise();
};
@ -92,15 +92,15 @@ public:
class status_exception : public Exception
{
public:
explicit status_exception(const ISC_STATUS *status_vector) throw();
status_exception(const status_exception&) throw();
explicit status_exception(const ISC_STATUS *status_vector) noexcept;
status_exception(const status_exception&) noexcept;
virtual ~status_exception() throw();
virtual ~status_exception() noexcept;
virtual void stuffByException(StaticStatusVector& status_vector) const throw();
virtual const char* what() const throw();
virtual void stuffByException(StaticStatusVector& status_vector) const noexcept;
virtual const char* what() const noexcept;
const ISC_STATUS* value() const throw() { return m_status_vector; }
const ISC_STATUS* value() const noexcept { return m_status_vector; }
[[noreturn]] static void raise(const ISC_STATUS* status_vector);
[[noreturn]] static void raise(const Arg::StatusVector& statusVector);
@ -109,9 +109,9 @@ public:
protected:
// Create exception with undefined status vector, this constructor allows
// derived classes create empty exception ...
status_exception() throw();
status_exception() noexcept;
// .. and adjust it later using somehow created status vector.
void set_status(const ISC_STATUS *new_vector) throw();
void set_status(const ISC_STATUS *new_vector) noexcept;
private:
ISC_STATUS* m_status_vector;
@ -164,7 +164,7 @@ class fatal_exception : public status_exception
public:
explicit fatal_exception(const char* message);
static void raiseFmt(const char* format, ...);
const char* what() const throw();
const char* what() const noexcept;
static void raise(const char* message);
};

View File

@ -1066,7 +1066,7 @@ void StableAttachmentPart::doOnIdleTimer(TimerImpl*)
JRD_shutdown_attachment(att);
}
JAttachment* Attachment::getInterface() throw()
JAttachment* Attachment::getInterface() noexcept
{
return att_stable->getInterface();
}

View File

@ -307,7 +307,7 @@ public:
: att(handle), jAtt(NULL), shutError(0)
{ }
Attachment* getHandle() throw()
Attachment* getHandle() noexcept
{
return att;
}
@ -743,17 +743,17 @@ public:
bool backupStateReadLock(thread_db* tdbb, SSHORT wait);
void backupStateReadUnLock(thread_db* tdbb);
StableAttachmentPart* getStable() throw()
StableAttachmentPart* getStable() noexcept
{
return att_stable;
}
void setStable(StableAttachmentPart *js) throw()
void setStable(StableAttachmentPart *js) noexcept
{
att_stable = js;
}
JAttachment* getInterface() throw();
JAttachment* getInterface() noexcept;
unsigned int getIdleTimeout() const
{

View File

@ -74,7 +74,7 @@ public:
return sAtt;
}
blb* getHandle() throw()
blb* getHandle() noexcept
{
return blob;
}
@ -118,7 +118,7 @@ public:
public:
JTransaction(jrd_tra* handle, StableAttachmentPart* sa);
jrd_tra* getHandle() throw()
jrd_tra* getHandle() noexcept
{
return transaction;
}
@ -178,7 +178,7 @@ public:
StableAttachmentPart* getAttachment();
DsqlCursor* getHandle() throw()
DsqlCursor* getHandle() noexcept
{
return cursor;
}
@ -224,7 +224,7 @@ public:
StableAttachmentPart* getAttachment();
DsqlBatch* getHandle() throw()
DsqlBatch* getHandle() noexcept
{
return batch;
}
@ -260,7 +260,7 @@ public:
return sAtt;
}
Applier* getHandle() throw()
Applier* getHandle() noexcept
{
return applier;
}
@ -315,7 +315,7 @@ public:
return sAtt;
}
DsqlRequest* getHandle() throw()
DsqlRequest* getHandle() noexcept
{
return statement;
}
@ -356,7 +356,7 @@ public:
return sAtt;
}
Statement* getHandle() throw()
Statement* getHandle() noexcept
{
return rq;
}
@ -379,7 +379,7 @@ public:
public:
JEvents(int aId, StableAttachmentPart* sa, Firebird::IEventCallback* aCallback);
JEvents* getHandle() throw()
JEvents* getHandle() noexcept
{
return this;
}
@ -463,15 +463,15 @@ public:
public:
explicit JAttachment(StableAttachmentPart* js);
StableAttachmentPart* getStable() throw()
StableAttachmentPart* getStable() noexcept
{
return att;
}
Jrd::Attachment* getHandle() throw();
const Jrd::Attachment* getHandle() const throw();
Jrd::Attachment* getHandle() noexcept;
const Jrd::Attachment* getHandle() const noexcept;
StableAttachmentPart* getAttachment() throw()
StableAttachmentPart* getAttachment() noexcept
{
return att;
}

View File

@ -209,7 +209,7 @@ const int ONE_DAY = 86400;
const unsigned MAX_CTX_VAR_SIZE = 255;
// auxiliary functions
double fbcot(double value) throw();
double fbcot(double value) noexcept;
// generic setParams functions
void setParamsDouble(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, int argsCount, dsc** args);
@ -431,7 +431,7 @@ static const char
TRUE_VALUE[] = "TRUE";
double fbcot(double value) throw()
double fbcot(double value) noexcept
{
return 1.0 / tan(value);
}

View File

@ -268,12 +268,12 @@ JAttachment::JAttachment(StableAttachmentPart* sa)
{
}
Attachment* JAttachment::getHandle() throw()
Attachment* JAttachment::getHandle() noexcept
{
return att ? att->getHandle() : NULL;
}
const Attachment* JAttachment::getHandle() const throw()
const Attachment* JAttachment::getHandle() const noexcept
{
return att ? att->getHandle() : NULL;
}
@ -1418,7 +1418,7 @@ static void successful_completion(CheckStatusWrapper* s, ISC_STATUS acceptCode =
// Stuff exception transliterated to the client charset.
static ISC_STATUS transliterateException(thread_db* tdbb, const Exception& ex, FbStatusVector* vector,
const char* func) throw()
const char* func) noexcept
{
ex.stuffException(vector);
@ -1438,7 +1438,7 @@ static ISC_STATUS transliterateException(thread_db* tdbb, const Exception& ex, F
// Transliterate status vector to the client charset.
void JRD_transliterate(thread_db* tdbb, Firebird::IStatus* vector) throw()
void JRD_transliterate(thread_db* tdbb, Firebird::IStatus* vector) noexcept
{
Jrd::Attachment* attachment = tdbb->getAttachment();
USHORT charSet;

View File

@ -76,7 +76,7 @@ void JRD_shutdown_attachment(Jrd::Attachment* attachment);
void JRD_shutdown_attachments(Jrd::Database* dbb);
void JRD_cancel_operation(Jrd::thread_db* tdbb, Jrd::Attachment* attachment, int option);
void JRD_make_role_name(Jrd::MetaName& userIdRole, const int dialect);
void JRD_transliterate(Jrd::thread_db* tdbb, Firebird::IStatus* vector) throw();
void JRD_transliterate(Jrd::thread_db* tdbb, Firebird::IStatus* vector) noexcept;
bool JRD_shutdown_database(Jrd::Database* dbb, const unsigned flags = 0);
// JRD_shutdown_database() flags

View File

@ -286,7 +286,7 @@ private:
// Does info buffer have enough space for SLONG?
static bool ck_space_for_numeric(UCHAR*& info, const UCHAR* const end);
// Make status vector permamnent, if one present in worker thread's space
void makePermanentStatusVector() throw();
void makePermanentStatusVector() noexcept;
// Read SPB on attach
void getOptions(Firebird::ClumpletReader&);
// Invoke appropriate service thread entry and finalize it correctly

View File

@ -37,7 +37,7 @@ namespace
class Cypher : public GlobalStorage
{
public:
Cypher(unsigned int l, const unsigned char* key) throw()
Cypher(unsigned int l, const unsigned char* key) noexcept
: s1(0), s2(0)
{
for (unsigned int n = 0; n < sizeof(state); ++n)
@ -52,7 +52,7 @@ public:
}
}
void transform(unsigned int length, const void* from, void* to) throw()
void transform(unsigned int length, const void* from, void* to) noexcept
{
unsigned char* t = static_cast<unsigned char*>(to);
const unsigned char* f = static_cast<const unsigned char*>(from);
@ -72,7 +72,7 @@ private:
unsigned char s1;
unsigned char s2;
void swap(unsigned char& c1, unsigned char& c2) throw()
void swap(unsigned char& c1, unsigned char& c2) noexcept
{
unsigned char temp = c1;
c1 = c2;

View File

@ -1139,7 +1139,7 @@ static const unsigned ANALYZE_LOOPBACK = 0x02;
static const unsigned ANALYZE_MOUNTS = 0x04;
static const unsigned ANALYZE_EMP_NAME = 0x08;
inline static void reset(IStatus* status) throw()
inline static void reset(IStatus* status) noexcept
{
status->init();
}

View File

@ -837,25 +837,25 @@ ServerCallbackBase::~ServerCallbackBase()
}
/*
void Rdb::set_async_vector(ISC_STATUS* userStatus) throw()
void Rdb::set_async_vector(ISC_STATUS* userStatus) noexcept
{
rdb_async_status_vector = userStatus;
rdb_async_thread_id = getThreadId();
}
void Rdb::reset_async_vector() throw()
void Rdb::reset_async_vector() noexcept
{
rdb_async_thread_id = 0;
rdb_async_status_vector = NULL;
}
ISC_STATUS* Rdb::get_status_vector() throw()
ISC_STATUS* Rdb::get_status_vector() noexcept
{
return rdb_async_thread_id == getThreadId() ? rdb_async_status_vector : rdb_status_vector;
}
*/
void Rrq::saveStatus(const Firebird::Exception& ex) throw()
void Rrq::saveStatus(const Firebird::Exception& ex) noexcept
{
if (rrqStatus.isSuccess())
{
@ -866,7 +866,7 @@ void Rrq::saveStatus(const Firebird::Exception& ex) throw()
}
}
void Rrq::saveStatus(Firebird::IStatus* v) throw()
void Rrq::saveStatus(Firebird::IStatus* v) noexcept
{
if (rrqStatus.isSuccess())
{

View File

@ -415,8 +415,8 @@ public:
static ISC_STATUS badHandle() { return isc_bad_req_handle; }
void saveStatus(const Firebird::Exception& ex) throw();
void saveStatus(Firebird::IStatus* ex) throw();
void saveStatus(const Firebird::Exception& ex) noexcept;
void saveStatus(Firebird::IStatus* ex) noexcept;
};

View File

@ -347,7 +347,7 @@ namespace
return NULL;
}
const char* getName() const throw()
const char* getName() const noexcept
{
return name.nullStr();
}
@ -484,7 +484,7 @@ namespace
return findPluginConfig(pluginLoaderConfig, confName);
}
const PluginModule* getPluggedModule() const throw()
const PluginModule* getPluggedModule() const noexcept
{
return module;
}
@ -496,7 +496,7 @@ namespace
return plugName.c_str();
}
void setReleaseDelay(ISC_UINT64 microSeconds) throw()
void setReleaseDelay(ISC_UINT64 microSeconds) noexcept
{
#ifdef DEBUG_PLUGINS
fprintf(stderr, "Set delay for ConfiguredPlugin %s:%p\n", plugName.c_str(), this);

View File

@ -3430,7 +3430,7 @@ const char* circularAlloc(const char* s, unsigned len)
// CVC: Do not let "perm" be incremented before "trans", because it may lead to serious memory errors,
// since our code blindly passes the same vector twice.
void makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* trans) throw()
void makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* trans) noexcept
{
try
{
@ -3490,7 +3490,7 @@ void makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* trans) throw()
} // anonymous namespace
void makePermanentVector(ISC_STATUS* v) throw()
void makePermanentVector(ISC_STATUS* v) noexcept
{
makePermanentVector(v, v);
}

View File

@ -82,7 +82,7 @@ namespace Firebird
void setLogin(Firebird::ClumpletWriter& dpb, bool spbFlag);
// Put status vector strings into strings circular buffer
void makePermanentVector(ISC_STATUS* v) throw();
void makePermanentVector(ISC_STATUS* v) noexcept;
namespace Why
{

View File

@ -876,7 +876,7 @@ namespace Why
class StatusVector : public AutoIface<BaseStatus<StatusVector> >
{
public:
explicit StatusVector(ISC_STATUS* v = NULL) throw()
explicit StatusVector(ISC_STATUS* v = NULL) noexcept
: localVector(v ? v : localStatus)
{ }