mirror of https://gitee.com/bigwinds/arangodb
don't call throwing functions in dtor
This commit is contained in:
parent
f1e6af1ce1
commit
8e4e463239
|
@ -265,16 +265,16 @@ void MMFilesCleanupThread::cleanupCollection(arangodb::LogicalCollection* collec
|
||||||
auto const type = ditch->type();
|
auto const type = ditch->type();
|
||||||
|
|
||||||
if (type == arangodb::MMFilesDitch::TRI_DITCH_DATAFILE_DROP) {
|
if (type == arangodb::MMFilesDitch::TRI_DITCH_DATAFILE_DROP) {
|
||||||
dynamic_cast<arangodb::MMFilesDropDatafileDitch*>(ditch)->executeCallback();
|
static_cast<arangodb::MMFilesDropDatafileDitch*>(ditch)->executeCallback();
|
||||||
delete ditch;
|
delete ditch;
|
||||||
// next iteration
|
// next iteration
|
||||||
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_DATAFILE_RENAME) {
|
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_DATAFILE_RENAME) {
|
||||||
dynamic_cast<arangodb::MMFilesRenameDatafileDitch*>(ditch)->executeCallback();
|
static_cast<arangodb::MMFilesRenameDatafileDitch*>(ditch)->executeCallback();
|
||||||
delete ditch;
|
delete ditch;
|
||||||
// next iteration
|
// next iteration
|
||||||
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_COLLECTION_UNLOAD) {
|
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_COLLECTION_UNLOAD) {
|
||||||
// collection will be unloaded
|
// collection will be unloaded
|
||||||
bool hasUnloaded = dynamic_cast<arangodb::MMFilesUnloadCollectionDitch*>(ditch)
|
bool hasUnloaded = static_cast<arangodb::MMFilesUnloadCollectionDitch*>(ditch)
|
||||||
->executeCallback();
|
->executeCallback();
|
||||||
delete ditch;
|
delete ditch;
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ void MMFilesCleanupThread::cleanupCollection(arangodb::LogicalCollection* collec
|
||||||
}
|
}
|
||||||
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_COLLECTION_DROP) {
|
} else if (type == arangodb::MMFilesDitch::TRI_DITCH_COLLECTION_DROP) {
|
||||||
// collection will be dropped
|
// collection will be dropped
|
||||||
bool hasDropped = dynamic_cast<arangodb::MMFilesDropCollectionDitch*>(ditch)
|
bool hasDropped = static_cast<arangodb::MMFilesDropCollectionDitch*>(ditch)
|
||||||
->executeCallback();
|
->executeCallback();
|
||||||
delete ditch;
|
delete ditch;
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,11 @@ Conductor::Conductor(uint64_t executionNumber, TRI_vocbase_t* vocbase,
|
||||||
|
|
||||||
Conductor::~Conductor() {
|
Conductor::~Conductor() {
|
||||||
if (_state != ExecutionState::DEFAULT) {
|
if (_state != ExecutionState::DEFAULT) {
|
||||||
this->cancel();
|
try {
|
||||||
|
this->cancel();
|
||||||
|
} catch (...) {
|
||||||
|
// must not throw exception from here
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ namespace basics {
|
||||||
class ReadWriteLock {
|
class ReadWriteLock {
|
||||||
ReadWriteLock(ReadWriteLock const&) = delete;
|
ReadWriteLock(ReadWriteLock const&) = delete;
|
||||||
ReadWriteLock& operator=(ReadWriteLock const&) = delete;
|
ReadWriteLock& operator=(ReadWriteLock const&) = delete;
|
||||||
|
ReadWriteLock(ReadWriteLock&&) = delete;
|
||||||
|
ReadWriteLock& operator=(ReadWriteLock&&) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @brief constructs a read-write lock
|
/// @brief constructs a read-write lock
|
||||||
|
|
|
@ -491,20 +491,26 @@ std::string SslServerFeature::stringifySslOptions(uint64_t opts) const {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SSL_OP_PKCS1_CHECK_1
|
#ifdef SSL_OP_PKCS1_CHECK_1
|
||||||
if (opts & SSL_OP_PKCS1_CHECK_1) {
|
if (SSL_OP_PKCS1_CHECK_1) {
|
||||||
result.append(", SSL_OP_PKCS1_CHECK_1");
|
if (opts & SSL_OP_PKCS1_CHECK_1) {
|
||||||
|
result.append(", SSL_OP_PKCS1_CHECK_1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SSL_OP_PKCS1_CHECK_2
|
#ifdef SSL_OP_PKCS1_CHECK_2
|
||||||
if (opts & SSL_OP_PKCS1_CHECK_2) {
|
if (SSL_OP_PKCS1_CHECK_1) {
|
||||||
result.append(", SSL_OP_PKCS1_CHECK_2");
|
if (opts & SSL_OP_PKCS1_CHECK_2) {
|
||||||
|
result.append(", SSL_OP_PKCS1_CHECK_2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
|
#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
|
||||||
if (opts & SSL_OP_NETSCAPE_CA_DN_BUG) {
|
if (SSL_OP_NETSCAPE_CA_DN_BUG) {
|
||||||
result.append(", SSL_OP_NETSCAPE_CA_DN_BUG");
|
if (opts & SSL_OP_NETSCAPE_CA_DN_BUG) {
|
||||||
|
result.append(", SSL_OP_NETSCAPE_CA_DN_BUG");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue