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