mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-30 07:26:33 +02:00
#538 prevent destructors from throwing exceptions
This commit is contained in:
parent
c8686a727d
commit
544229302e
@ -47,7 +47,14 @@ OpenSSLInitializer::OpenSSLInitializer()
|
|||||||
|
|
||||||
OpenSSLInitializer::~OpenSSLInitializer()
|
OpenSSLInitializer::~OpenSSLInitializer()
|
||||||
{
|
{
|
||||||
uninitialize();
|
try
|
||||||
|
{
|
||||||
|
uninitialize();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,14 @@ PooledSessionImpl::PooledSessionImpl(PooledSessionHolder* pHolder):
|
|||||||
|
|
||||||
PooledSessionImpl::~PooledSessionImpl()
|
PooledSessionImpl::~PooledSessionImpl()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,13 +75,20 @@ RecordSet::RecordSet(const RecordSet& other):
|
|||||||
|
|
||||||
RecordSet::~RecordSet()
|
RecordSet::~RecordSet()
|
||||||
{
|
{
|
||||||
delete _pBegin;
|
try
|
||||||
delete _pEnd;
|
{
|
||||||
if(_pFilter) _pFilter->release();
|
delete _pBegin;
|
||||||
|
delete _pEnd;
|
||||||
|
if(_pFilter) _pFilter->release();
|
||||||
|
|
||||||
RowMap::iterator it = _rowMap.begin();
|
RowMap::iterator it = _rowMap.begin();
|
||||||
RowMap::iterator end = _rowMap.end();
|
RowMap::iterator end = _rowMap.end();
|
||||||
for (; it != end; ++it) delete it->second;
|
for (; it != end; ++it) delete it->second;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,9 +60,16 @@ void RowFilter::init()
|
|||||||
|
|
||||||
RowFilter::~RowFilter()
|
RowFilter::~RowFilter()
|
||||||
{
|
{
|
||||||
release();
|
try
|
||||||
if (_pRecordSet) _pRecordSet->filter(0);
|
{
|
||||||
if (_pParent.get()) _pParent->removeFilter(this);
|
release();
|
||||||
|
if (_pRecordSet) _pRecordSet->filter(0);
|
||||||
|
if (_pParent.get()) _pParent->removeFilter(this);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,14 @@ SQLChannel::SQLChannel(const std::string& connector,
|
|||||||
|
|
||||||
SQLChannel::~SQLChannel()
|
SQLChannel::~SQLChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,14 @@ SessionPool::SessionPool(const std::string& connector, const std::string& connec
|
|||||||
|
|
||||||
SessionPool::~SessionPool()
|
SessionPool::~SessionPool()
|
||||||
{
|
{
|
||||||
shutdown();
|
try
|
||||||
|
{
|
||||||
|
shutdown();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,21 +40,28 @@ Transaction::Transaction(Poco::Data::Session& rSession, bool start):
|
|||||||
|
|
||||||
Transaction::~Transaction()
|
Transaction::~Transaction()
|
||||||
{
|
{
|
||||||
if (_rSession.isTransaction())
|
try
|
||||||
{
|
{
|
||||||
try
|
if (_rSession.isTransaction())
|
||||||
{
|
{
|
||||||
if (_pLogger)
|
try
|
||||||
_pLogger->debug("Rolling back transaction.");
|
{
|
||||||
|
if (_pLogger)
|
||||||
|
_pLogger->debug("Rolling back transaction.");
|
||||||
|
|
||||||
_rSession.rollback();
|
_rSession.rollback();
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
if (_pLogger)
|
if (_pLogger)
|
||||||
_pLogger->error("Error while rolling back database transaction.");
|
_pLogger->error("Error while rolling back database transaction.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +64,14 @@ public:
|
|||||||
|
|
||||||
virtual ~AbstractCache()
|
virtual ~AbstractCache()
|
||||||
{
|
{
|
||||||
uninitialize();
|
try
|
||||||
|
{
|
||||||
|
uninitialize();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void add(const TKey& key, const TValue& val)
|
void add(const TKey& key, const TValue& val)
|
||||||
|
@ -94,8 +94,15 @@ public:
|
|||||||
~Activity()
|
~Activity()
|
||||||
/// Stops and destroys the activity.
|
/// Stops and destroys the activity.
|
||||||
{
|
{
|
||||||
stop();
|
try
|
||||||
wait();
|
{
|
||||||
|
stop();
|
||||||
|
wait();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void start()
|
void start()
|
||||||
|
@ -58,7 +58,6 @@ union Placeholder
|
|||||||
/// where the object was allocated (0 => heap, 1 => local).
|
/// where the object was allocated (0 => heap, 1 => local).
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
struct Size
|
struct Size
|
||||||
{
|
{
|
||||||
static const unsigned int value = SizeV;
|
static const unsigned int value = SizeV;
|
||||||
@ -86,7 +85,7 @@ public:
|
|||||||
|
|
||||||
PlaceholderT* content() const
|
PlaceholderT* content() const
|
||||||
{
|
{
|
||||||
if(isLocal())
|
if (isLocal())
|
||||||
return reinterpret_cast<PlaceholderT*>(holder);
|
return reinterpret_cast<PlaceholderT*>(holder);
|
||||||
else
|
else
|
||||||
return pHolder;
|
return pHolder;
|
||||||
@ -192,9 +191,9 @@ public:
|
|||||||
/// Destructor. If Any is locally held, calls ValueHolder destructor;
|
/// Destructor. If Any is locally held, calls ValueHolder destructor;
|
||||||
/// otherwise, deletes the placeholder from the heap.
|
/// otherwise, deletes the placeholder from the heap.
|
||||||
{
|
{
|
||||||
if(!empty())
|
if (!empty())
|
||||||
{
|
{
|
||||||
if(_valueHolder.isLocal())
|
if (_valueHolder.isLocal())
|
||||||
destruct();
|
destruct();
|
||||||
else
|
else
|
||||||
delete content();
|
delete content();
|
||||||
@ -341,7 +340,7 @@ private:
|
|||||||
|
|
||||||
void construct(const Any& other)
|
void construct(const Any& other)
|
||||||
{
|
{
|
||||||
if(!other.empty())
|
if (!other.empty())
|
||||||
other.content()->clone(&_valueHolder);
|
other.content()->clone(&_valueHolder);
|
||||||
else
|
else
|
||||||
_valueHolder.erase();
|
_valueHolder.erase();
|
||||||
|
@ -167,7 +167,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class BasicMemoryBinaryWriter : public BinaryWriter
|
class BasicMemoryBinaryWriter: public BinaryWriter
|
||||||
/// A convenient wrapper for using Buffer and MemoryStream with BinarWriter.
|
/// A convenient wrapper for using Buffer and MemoryStream with BinarWriter.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -187,7 +187,14 @@ public:
|
|||||||
|
|
||||||
~BasicMemoryBinaryWriter()
|
~BasicMemoryBinaryWriter()
|
||||||
{
|
{
|
||||||
flush();
|
try
|
||||||
|
{
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Buffer<T>& data()
|
Buffer<T>& data()
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
return new char_type[static_cast<std::size_t>(size)];
|
return new char_type[static_cast<std::size_t>(size)];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void deallocate(char_type* ptr, std::streamsize /*size*/)
|
static void deallocate(char_type* ptr, std::streamsize /*size*/) throw()
|
||||||
{
|
{
|
||||||
delete [] ptr;
|
delete [] ptr;
|
||||||
}
|
}
|
||||||
|
@ -592,7 +592,7 @@ private:
|
|||||||
|
|
||||||
void destruct()
|
void destruct()
|
||||||
{
|
{
|
||||||
if(!isEmpty()) delete content();
|
if (!isEmpty()) delete content();
|
||||||
}
|
}
|
||||||
|
|
||||||
VarHolder* _pHolder;
|
VarHolder* _pHolder;
|
||||||
@ -636,7 +636,7 @@ private:
|
|||||||
|
|
||||||
void construct(const Var& other)
|
void construct(const Var& other)
|
||||||
{
|
{
|
||||||
if(!other.isEmpty())
|
if (!other.isEmpty())
|
||||||
other.content()->clone(&_placeholder);
|
other.content()->clone(&_placeholder);
|
||||||
else
|
else
|
||||||
_placeholder.erase();
|
_placeholder.erase();
|
||||||
@ -644,9 +644,9 @@ private:
|
|||||||
|
|
||||||
void destruct()
|
void destruct()
|
||||||
{
|
{
|
||||||
if(!isEmpty())
|
if (!isEmpty())
|
||||||
{
|
{
|
||||||
if(_placeholder.isLocal())
|
if (_placeholder.isLocal())
|
||||||
content()->~VarHolder();
|
content()->~VarHolder();
|
||||||
else
|
else
|
||||||
delete content();
|
delete content();
|
||||||
|
@ -151,7 +151,14 @@ inline NDCScope::NDCScope(const std::string& info, int line, const char* filenam
|
|||||||
|
|
||||||
inline NDCScope::~NDCScope()
|
inline NDCScope::~NDCScope()
|
||||||
{
|
{
|
||||||
NestedDiagnosticContext::current().pop();
|
try
|
||||||
|
{
|
||||||
|
NestedDiagnosticContext::current().pop();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,9 +194,16 @@ public:
|
|||||||
~ObjectPool()
|
~ObjectPool()
|
||||||
/// Destroys the ObjectPool.
|
/// Destroys the ObjectPool.
|
||||||
{
|
{
|
||||||
for (typename std::vector<P>::iterator it = _pool.begin(); it != _pool.end(); ++it)
|
try
|
||||||
{
|
{
|
||||||
_factory.destroyObject(*it);
|
for (typename std::vector<P>::iterator it = _pool.begin(); it != _pool.end(); ++it)
|
||||||
|
{
|
||||||
|
_factory.destroyObject(*it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,14 @@ inline ScopedRWLock::ScopedRWLock(RWLock& rwl, bool write): _rwl(rwl)
|
|||||||
|
|
||||||
inline ScopedRWLock::~ScopedRWLock()
|
inline ScopedRWLock::~ScopedRWLock()
|
||||||
{
|
{
|
||||||
_rwl.unlock();
|
try
|
||||||
|
{
|
||||||
|
_rwl.unlock();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
void duplicate() const;
|
void duplicate() const;
|
||||||
/// Increments the object's reference count.
|
/// Increments the object's reference count.
|
||||||
|
|
||||||
void release() const;
|
void release() const throw();
|
||||||
/// Decrements the object's reference count
|
/// Decrements the object's reference count
|
||||||
/// and deletes the object if the count
|
/// and deletes the object if the count
|
||||||
/// reaches zero.
|
/// reaches zero.
|
||||||
@ -77,9 +77,16 @@ inline void RefCountedObject::duplicate() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void RefCountedObject::release() const
|
inline void RefCountedObject::release() const throw()
|
||||||
{
|
{
|
||||||
if (--_counter == 0) delete this;
|
try
|
||||||
|
{
|
||||||
|
if (--_counter == 0) delete this;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,14 @@ public:
|
|||||||
|
|
||||||
~ScopedLock()
|
~ScopedLock()
|
||||||
{
|
{
|
||||||
_mutex.unlock();
|
try
|
||||||
|
{
|
||||||
|
_mutex.unlock();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -82,7 +89,14 @@ public:
|
|||||||
|
|
||||||
~ScopedLockWithUnlock()
|
~ScopedLockWithUnlock()
|
||||||
{
|
{
|
||||||
unlock();
|
try
|
||||||
|
{
|
||||||
|
unlock();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unlock()
|
void unlock()
|
||||||
|
@ -143,7 +143,14 @@ public:
|
|||||||
|
|
||||||
~SharedPtr()
|
~SharedPtr()
|
||||||
{
|
{
|
||||||
release();
|
try
|
||||||
|
{
|
||||||
|
release();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedPtr& assign(C* ptr)
|
SharedPtr& assign(C* ptr)
|
||||||
|
@ -59,8 +59,15 @@ AsyncChannel::AsyncChannel(Channel* pChannel, Thread::Priority prio):
|
|||||||
|
|
||||||
AsyncChannel::~AsyncChannel()
|
AsyncChannel::~AsyncChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
if (_pChannel) _pChannel->release();
|
{
|
||||||
|
close();
|
||||||
|
if (_pChannel) _pChannel->release();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -541,8 +541,15 @@ DirectoryWatcher::DirectoryWatcher(const Poco::File& directory, int eventMask, i
|
|||||||
|
|
||||||
DirectoryWatcher::~DirectoryWatcher()
|
DirectoryWatcher::~DirectoryWatcher()
|
||||||
{
|
{
|
||||||
stop();
|
try
|
||||||
delete _pStrategy;
|
{
|
||||||
|
stop();
|
||||||
|
delete _pStrategy;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +81,14 @@ EventLogChannel::EventLogChannel(const std::string& name, const std::string& hos
|
|||||||
|
|
||||||
EventLogChannel::~EventLogChannel()
|
EventLogChannel::~EventLogChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,10 +71,17 @@ FileChannel::FileChannel(const std::string& path):
|
|||||||
|
|
||||||
FileChannel::~FileChannel()
|
FileChannel::~FileChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
delete _pRotateStrategy;
|
{
|
||||||
delete _pArchiveStrategy;
|
close();
|
||||||
delete _pPurgeStrategy;
|
delete _pRotateStrategy;
|
||||||
|
delete _pArchiveStrategy;
|
||||||
|
delete _pPurgeStrategy;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -444,7 +444,14 @@ public:
|
|||||||
}
|
}
|
||||||
~AutoLoggerShutdown()
|
~AutoLoggerShutdown()
|
||||||
{
|
{
|
||||||
Logger::shutdown();
|
try
|
||||||
|
{
|
||||||
|
Logger::shutdown();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,7 +30,14 @@ NotificationQueue::NotificationQueue()
|
|||||||
|
|
||||||
NotificationQueue::~NotificationQueue()
|
NotificationQueue::~NotificationQueue()
|
||||||
{
|
{
|
||||||
clear();
|
try
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,14 @@ PriorityNotificationQueue::PriorityNotificationQueue()
|
|||||||
|
|
||||||
PriorityNotificationQueue::~PriorityNotificationQueue()
|
PriorityNotificationQueue::~PriorityNotificationQueue()
|
||||||
{
|
{
|
||||||
clear();
|
try
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +52,14 @@ SimpleFileChannel::SimpleFileChannel(const std::string& path):
|
|||||||
|
|
||||||
SimpleFileChannel::~SimpleFileChannel()
|
SimpleFileChannel::~SimpleFileChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,18 +37,25 @@ public:
|
|||||||
|
|
||||||
~TempFileCollector()
|
~TempFileCollector()
|
||||||
{
|
{
|
||||||
for (std::set<std::string>::iterator it = _files.begin(); it != _files.end(); ++it)
|
try
|
||||||
{
|
{
|
||||||
try
|
for (std::set<std::string>::iterator it = _files.begin(); it != _files.end(); ++it)
|
||||||
{
|
|
||||||
File f(*it);
|
|
||||||
if (f.exists())
|
|
||||||
f.remove(true);
|
|
||||||
}
|
|
||||||
catch (Exception&)
|
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File f(*it);
|
||||||
|
if (f.exists())
|
||||||
|
f.remove(true);
|
||||||
|
}
|
||||||
|
catch (Exception&)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerFile(const std::string& path)
|
void registerFile(const std::string& path)
|
||||||
@ -81,17 +88,24 @@ TemporaryFile::TemporaryFile(const std::string& tempDir):
|
|||||||
|
|
||||||
TemporaryFile::~TemporaryFile()
|
TemporaryFile::~TemporaryFile()
|
||||||
{
|
{
|
||||||
if (!_keep)
|
try
|
||||||
{
|
{
|
||||||
try
|
if (!_keep)
|
||||||
{
|
|
||||||
if (exists())
|
|
||||||
remove(true);
|
|
||||||
}
|
|
||||||
catch (Exception&)
|
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (exists())
|
||||||
|
remove(true);
|
||||||
|
}
|
||||||
|
catch (Exception&)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -280,7 +280,14 @@ ThreadPool::ThreadPool(const std::string& name,
|
|||||||
|
|
||||||
ThreadPool::~ThreadPool()
|
ThreadPool::~ThreadPool()
|
||||||
{
|
{
|
||||||
stopAll();
|
try
|
||||||
|
{
|
||||||
|
stopAll();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,14 @@ TimedNotificationQueue::TimedNotificationQueue()
|
|||||||
|
|
||||||
TimedNotificationQueue::~TimedNotificationQueue()
|
TimedNotificationQueue::~TimedNotificationQueue()
|
||||||
{
|
{
|
||||||
clear();
|
try
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,14 @@ Timer::Timer(long startInterval, long periodicInterval):
|
|||||||
|
|
||||||
Timer::~Timer()
|
Timer::~Timer()
|
||||||
{
|
{
|
||||||
stop();
|
try
|
||||||
|
{
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ const Var Var::operator + (const Var& other) const
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return add<Poco::Int64>(other);
|
return add<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return add<Poco::UInt64>(other);
|
return add<Poco::UInt64>(other);
|
||||||
@ -103,7 +103,7 @@ Var& Var::operator += (const Var& other)
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return *this = add<Poco::Int64>(other);
|
return *this = add<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return *this = add<Poco::UInt64>(other);
|
return *this = add<Poco::UInt64>(other);
|
||||||
@ -121,7 +121,7 @@ const Var Var::operator - (const Var& other) const
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return subtract<Poco::Int64>(other);
|
return subtract<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return subtract<Poco::UInt64>(other);
|
return subtract<Poco::UInt64>(other);
|
||||||
@ -137,7 +137,7 @@ Var& Var::operator -= (const Var& other)
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return *this = subtract<Poco::Int64>(other);
|
return *this = subtract<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return *this = subtract<Poco::UInt64>(other);
|
return *this = subtract<Poco::UInt64>(other);
|
||||||
@ -153,7 +153,7 @@ const Var Var::operator * (const Var& other) const
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return multiply<Poco::Int64>(other);
|
return multiply<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return multiply<Poco::UInt64>(other);
|
return multiply<Poco::UInt64>(other);
|
||||||
@ -169,7 +169,7 @@ Var& Var::operator *= (const Var& other)
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return *this = multiply<Poco::Int64>(other);
|
return *this = multiply<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return *this = multiply<Poco::UInt64>(other);
|
return *this = multiply<Poco::UInt64>(other);
|
||||||
@ -185,7 +185,7 @@ const Var Var::operator / (const Var& other) const
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return divide<Poco::Int64>(other);
|
return divide<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return divide<Poco::UInt64>(other);
|
return divide<Poco::UInt64>(other);
|
||||||
@ -201,7 +201,7 @@ Var& Var::operator /= (const Var& other)
|
|||||||
{
|
{
|
||||||
if (isInteger())
|
if (isInteger())
|
||||||
{
|
{
|
||||||
if(isSigned())
|
if (isSigned())
|
||||||
return *this = divide<Poco::Int64>(other);
|
return *this = divide<Poco::Int64>(other);
|
||||||
else
|
else
|
||||||
return *this = divide<Poco::UInt64>(other);
|
return *this = divide<Poco::UInt64>(other);
|
||||||
|
@ -84,7 +84,14 @@ public:
|
|||||||
|
|
||||||
virtual ~PooledConnection()
|
virtual ~PooledConnection()
|
||||||
{
|
{
|
||||||
_pool.returnObject(_connection);
|
try
|
||||||
|
{
|
||||||
|
_pool.returnObject(_connection);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
operator Connection::Ptr ()
|
operator Connection::Ptr ()
|
||||||
|
@ -87,7 +87,14 @@ public:
|
|||||||
virtual ~ParallelSocketAcceptor()
|
virtual ~ParallelSocketAcceptor()
|
||||||
/// Destroys the ParallelSocketAcceptor.
|
/// Destroys the ParallelSocketAcceptor.
|
||||||
{
|
{
|
||||||
unregisterAcceptor();
|
try
|
||||||
|
{
|
||||||
|
unregisterAcceptor();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void registerAcceptor(SocketReactor& reactor)
|
virtual void registerAcceptor(SocketReactor& reactor)
|
||||||
|
@ -88,7 +88,14 @@ public:
|
|||||||
virtual ~SocketAcceptor()
|
virtual ~SocketAcceptor()
|
||||||
/// Destroys the SocketAcceptor.
|
/// Destroys the SocketAcceptor.
|
||||||
{
|
{
|
||||||
unregisterAcceptor();
|
try
|
||||||
|
{
|
||||||
|
unregisterAcceptor();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void registerAcceptor(SocketReactor& reactor)
|
virtual void registerAcceptor(SocketReactor& reactor)
|
||||||
|
@ -92,7 +92,14 @@ public:
|
|||||||
virtual ~SocketConnector()
|
virtual ~SocketConnector()
|
||||||
/// Destroys the SocketConnector.
|
/// Destroys the SocketConnector.
|
||||||
{
|
{
|
||||||
unregisterConnector();
|
try
|
||||||
|
{
|
||||||
|
unregisterConnector();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void registerConnector(SocketReactor& reactor)
|
virtual void registerConnector(SocketReactor& reactor)
|
||||||
|
@ -161,7 +161,14 @@ void* HTTPChunkedInputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPChunkedInputStream::operator delete(void* ptr)
|
void HTTPChunkedInputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +200,14 @@ void* HTTPChunkedOutputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPChunkedOutputStream::operator delete(void* ptr)
|
void HTTPChunkedOutputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,7 +130,14 @@ void* HTTPFixedLengthInputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPFixedLengthInputStream::operator delete(void* ptr)
|
void HTTPFixedLengthInputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -162,7 +169,14 @@ void* HTTPFixedLengthOutputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPFixedLengthOutputStream::operator delete(void* ptr)
|
void HTTPFixedLengthOutputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,7 +127,14 @@ void* HTTPHeaderInputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPHeaderInputStream::operator delete(void* ptr)
|
void HTTPHeaderInputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -159,7 +166,14 @@ void* HTTPHeaderOutputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPHeaderOutputStream::operator delete(void* ptr)
|
void HTTPHeaderOutputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,14 @@ HTTPServerConnection::HTTPServerConnection(const StreamSocket& socket, HTTPServe
|
|||||||
|
|
||||||
HTTPServerConnection::~HTTPServerConnection()
|
HTTPServerConnection::~HTTPServerConnection()
|
||||||
{
|
{
|
||||||
_pFactory->serverStopped -= Poco::delegate(this, &HTTPServerConnection::onServerStopped);
|
try
|
||||||
|
{
|
||||||
|
_pFactory->serverStopped -= Poco::delegate(this, &HTTPServerConnection::onServerStopped);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,15 +64,22 @@ HTTPSession::HTTPSession(const StreamSocket& socket, bool keepAlive):
|
|||||||
|
|
||||||
HTTPSession::~HTTPSession()
|
HTTPSession::~HTTPSession()
|
||||||
{
|
{
|
||||||
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
close();
|
if (_pBuffer) HTTPBufferAllocator::deallocate(_pBuffer, HTTPBufferAllocator::BUFFER_SIZE);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
delete _pException;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
poco_unexpected();
|
||||||
}
|
}
|
||||||
delete _pException;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,7 +121,14 @@ void* HTTPInputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPInputStream::operator delete(void* ptr)
|
void HTTPInputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -153,7 +160,14 @@ void* HTTPOutputStream::operator new(std::size_t size)
|
|||||||
|
|
||||||
void HTTPOutputStream::operator delete(void* ptr)
|
void HTTPOutputStream::operator delete(void* ptr)
|
||||||
{
|
{
|
||||||
_pool.release(ptr);
|
try
|
||||||
|
{
|
||||||
|
_pool.release(ptr);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,7 +131,13 @@ MultipartIOS::MultipartIOS(std::istream& istr, const std::string& boundary):
|
|||||||
|
|
||||||
MultipartIOS::~MultipartIOS()
|
MultipartIOS::~MultipartIOS()
|
||||||
{
|
{
|
||||||
_buf.sync();
|
try
|
||||||
|
{
|
||||||
|
_buf.sync();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,14 @@ void Net_API uninitializeNetwork()
|
|||||||
~NetworkInitializer()
|
~NetworkInitializer()
|
||||||
/// Calls Poco::Net::uninitializeNetwork();
|
/// Calls Poco::Net::uninitializeNetwork();
|
||||||
{
|
{
|
||||||
Poco::Net::uninitializeNetwork();
|
try
|
||||||
|
{
|
||||||
|
Poco::Net::uninitializeNetwork();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,7 +24,10 @@ namespace Poco {
|
|||||||
namespace Net {
|
namespace Net {
|
||||||
|
|
||||||
|
|
||||||
/// PartStore
|
//
|
||||||
|
// PartStore
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
PartStore::PartStore(const std::string& mediaType): PartSource(mediaType)
|
PartStore::PartStore(const std::string& mediaType): PartSource(mediaType)
|
||||||
{
|
{
|
||||||
@ -36,7 +39,10 @@ PartStore::~PartStore()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// FilePartStore
|
//
|
||||||
|
// FilePartStore
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
FilePartStore::FilePartStore(const std::string& content, const std::string& mediaType, const std::string& filename):
|
FilePartStore::FilePartStore(const std::string& content, const std::string& mediaType, const std::string& filename):
|
||||||
PartStore(mediaType),
|
PartStore(mediaType),
|
||||||
@ -56,7 +62,7 @@ FilePartStore::~FilePartStore()
|
|||||||
_fstr.close();
|
_fstr.close();
|
||||||
File(_path).remove();
|
File(_path).remove();
|
||||||
}
|
}
|
||||||
catch (Exception&)
|
catch (...)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,14 @@ RemoteSyslogChannel::RemoteSyslogChannel(const std::string& address, const std::
|
|||||||
|
|
||||||
RemoteSyslogChannel::~RemoteSyslogChannel()
|
RemoteSyslogChannel::~RemoteSyslogChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,14 @@ SMTPChannel::SMTPChannel(const std::string& mailhost, const std::string& sender,
|
|||||||
|
|
||||||
SMTPChannel::~SMTPChannel()
|
SMTPChannel::~SMTPChannel()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include <stropts.h>
|
#include <stropts.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using Poco::IOException;
|
using Poco::IOException;
|
||||||
using Poco::TimeoutException;
|
using Poco::TimeoutException;
|
||||||
using Poco::InvalidArgumentException;
|
using Poco::InvalidArgumentException;
|
||||||
|
@ -72,8 +72,15 @@ TCPServer::TCPServer(TCPServerConnectionFactory::Ptr pFactory, Poco::ThreadPool&
|
|||||||
|
|
||||||
TCPServer::~TCPServer()
|
TCPServer::~TCPServer()
|
||||||
{
|
{
|
||||||
stop();
|
try
|
||||||
_pDispatcher->release();
|
{
|
||||||
|
stop();
|
||||||
|
_pDispatcher->release();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "Poco/MemoryStream.h"
|
#include "Poco/MemoryStream.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace Net {
|
namespace Net {
|
||||||
@ -42,8 +42,15 @@ WebSocketImpl::WebSocketImpl(StreamSocketImpl* pStreamSocketImpl, bool mustMaskP
|
|||||||
|
|
||||||
WebSocketImpl::~WebSocketImpl()
|
WebSocketImpl::~WebSocketImpl()
|
||||||
{
|
{
|
||||||
_pStreamSocketImpl->release();
|
try
|
||||||
reset();
|
{
|
||||||
|
_pStreamSocketImpl->release();
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,9 +168,15 @@ Context::Context(
|
|||||||
|
|
||||||
Context::~Context()
|
Context::~Context()
|
||||||
{
|
{
|
||||||
SSL_CTX_free(_pSSLContext);
|
try
|
||||||
|
{
|
||||||
Poco::Crypto::OpenSSLInitializer::uninitialize();
|
SSL_CTX_free(_pSSLContext);
|
||||||
|
Poco::Crypto::OpenSSLInitializer::uninitialize();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,10 +37,17 @@ InvalidCertificateHandler::InvalidCertificateHandler(bool handleErrorsOnServerSi
|
|||||||
|
|
||||||
InvalidCertificateHandler::~InvalidCertificateHandler()
|
InvalidCertificateHandler::~InvalidCertificateHandler()
|
||||||
{
|
{
|
||||||
if (_handleErrorsOnServerSide)
|
try
|
||||||
SSLManager::instance().ServerVerificationError -= Delegate<InvalidCertificateHandler, VerificationErrorArgs>(this, &InvalidCertificateHandler::onInvalidCertificate);
|
{
|
||||||
else
|
if (_handleErrorsOnServerSide)
|
||||||
SSLManager::instance().ClientVerificationError -= Delegate<InvalidCertificateHandler, VerificationErrorArgs>(this, &InvalidCertificateHandler::onInvalidCertificate);
|
SSLManager::instance().ServerVerificationError -= Delegate<InvalidCertificateHandler, VerificationErrorArgs>(this, &InvalidCertificateHandler::onInvalidCertificate);
|
||||||
|
else
|
||||||
|
SSLManager::instance().ClientVerificationError -= Delegate<InvalidCertificateHandler, VerificationErrorArgs>(this, &InvalidCertificateHandler::onInvalidCertificate);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,14 @@ PrivateKeyPassphraseHandler::PrivateKeyPassphraseHandler(bool onServerSide): _se
|
|||||||
|
|
||||||
PrivateKeyPassphraseHandler::~PrivateKeyPassphraseHandler()
|
PrivateKeyPassphraseHandler::~PrivateKeyPassphraseHandler()
|
||||||
{
|
{
|
||||||
SSLManager::instance().PrivateKeyPassphraseRequired -= Delegate<PrivateKeyPassphraseHandler, std::string>(this, &PrivateKeyPassphraseHandler::onPrivateKeyRequested);
|
try
|
||||||
|
{
|
||||||
|
SSLManager::instance().PrivateKeyPassphraseRequired -= Delegate<PrivateKeyPassphraseHandler, std::string>(this, &PrivateKeyPassphraseHandler::onPrivateKeyRequested);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,14 @@ SSLManager::SSLManager()
|
|||||||
|
|
||||||
SSLManager::~SSLManager()
|
SSLManager::~SSLManager()
|
||||||
{
|
{
|
||||||
shutdown();
|
try
|
||||||
|
{
|
||||||
|
shutdown();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,14 @@ SecureServerSocketImpl::SecureServerSocketImpl(Context::Ptr pContext):
|
|||||||
|
|
||||||
SecureServerSocketImpl::~SecureServerSocketImpl()
|
SecureServerSocketImpl::~SecureServerSocketImpl()
|
||||||
{
|
{
|
||||||
reset();
|
try
|
||||||
|
{
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,14 @@ SecureStreamSocketImpl::SecureStreamSocketImpl(StreamSocketImpl* pStreamSocket,
|
|||||||
|
|
||||||
SecureStreamSocketImpl::~SecureStreamSocketImpl()
|
SecureStreamSocketImpl::~SecureStreamSocketImpl()
|
||||||
{
|
{
|
||||||
reset();
|
try
|
||||||
|
{
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,14 @@ public:
|
|||||||
|
|
||||||
~ArchiveImpl()
|
~ArchiveImpl()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& path() const
|
const std::string& path() const
|
||||||
|
@ -232,8 +232,15 @@ Timer::Timer(Poco::Thread::Priority priority)
|
|||||||
|
|
||||||
Timer::~Timer()
|
Timer::~Timer()
|
||||||
{
|
{
|
||||||
_queue.enqueueNotification(new StopNotification(_queue), Poco::Clock(0));
|
try
|
||||||
_thread.join();
|
{
|
||||||
|
_queue.enqueueNotification(new StopNotification(_queue), Poco::Clock(0));
|
||||||
|
_thread.join();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,7 +54,14 @@ Decompress::Decompress(std::istream& in, const Poco::Path& outputDir, bool flatt
|
|||||||
|
|
||||||
Decompress::~Decompress()
|
Decompress::~Decompress()
|
||||||
{
|
{
|
||||||
EOk -= Poco::Delegate<Decompress, std::pair<const ZipLocalFileHeader, const Poco::Path> >(this, &Decompress::onOk);
|
try
|
||||||
|
{
|
||||||
|
EOk -= Poco::Delegate<Decompress, std::pair<const ZipLocalFileHeader, const Poco::Path> >(this, &Decompress::onOk);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,7 +242,14 @@ PartialOutputStream::PartialOutputStream(std::ostream& ostr, std::size_t start,
|
|||||||
|
|
||||||
PartialOutputStream::~PartialOutputStream()
|
PartialOutputStream::~PartialOutputStream()
|
||||||
{
|
{
|
||||||
close();
|
try
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
poco_unexpected();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user