mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 23:12:57 +02:00
fix 'catching polymorphic type by value' warnings
This commit is contained in:
parent
037aff416b
commit
0693ff95f7
@ -526,7 +526,7 @@ void FileChannelTest::testWrongPurgeOption()
|
||||
{
|
||||
pChannel->setProperty(FileChannel::PROP_PURGEAGE, "peace");
|
||||
fail("must fail");
|
||||
} catch (InvalidArgumentException)
|
||||
} catch (InvalidArgumentException&)
|
||||
{
|
||||
assertTrue (pChannel->getProperty(FileChannel::PROP_PURGEAGE) == "5 seconds");
|
||||
}
|
||||
@ -535,7 +535,7 @@ void FileChannelTest::testWrongPurgeOption()
|
||||
{
|
||||
pChannel->setProperty(FileChannel::PROP_PURGECOUNT, "peace");
|
||||
fail("must fail");
|
||||
} catch (InvalidArgumentException)
|
||||
} catch (InvalidArgumentException&)
|
||||
{
|
||||
assertTrue (pChannel->getProperty(FileChannel::PROP_PURGEAGE) == "5 seconds");
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace
|
||||
public:
|
||||
void run()
|
||||
{
|
||||
|
||||
|
||||
testEvent.wait();
|
||||
_timestamp.update();
|
||||
}
|
||||
@ -66,11 +66,11 @@ void NamedEventTest::testNamedEvent()
|
||||
thr1.start(te);
|
||||
Timestamp now;
|
||||
Thread::sleep(2000);
|
||||
try
|
||||
try
|
||||
{
|
||||
testEvent.set();
|
||||
}
|
||||
catch(Poco::NotImplementedException e)
|
||||
catch(Poco::NotImplementedException& e)
|
||||
{
|
||||
#if POCO_OS != POCO_OS_ANDROID
|
||||
throw e;
|
||||
@ -84,11 +84,11 @@ void NamedEventTest::testNamedEvent()
|
||||
thr2.start(te);
|
||||
now.update();
|
||||
Thread::sleep(2000);
|
||||
try
|
||||
try
|
||||
{
|
||||
testEvent.set();
|
||||
}
|
||||
catch(Poco::NotImplementedException e)
|
||||
catch(Poco::NotImplementedException& e)
|
||||
{
|
||||
#if POCO_OS != POCO_OS_ANDROID
|
||||
throw e;
|
||||
|
@ -33,7 +33,7 @@ namespace
|
||||
public:
|
||||
void run()
|
||||
{
|
||||
|
||||
|
||||
testMutex.lock();
|
||||
_timestamp.update();
|
||||
testMutex.unlock();
|
||||
@ -54,7 +54,7 @@ namespace
|
||||
TestTryLock(): _locked(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void run()
|
||||
{
|
||||
if (testMutex.tryLock())
|
||||
@ -87,7 +87,7 @@ NamedMutexTest::~NamedMutexTest()
|
||||
|
||||
void NamedMutexTest::testLock()
|
||||
{
|
||||
try
|
||||
try
|
||||
{
|
||||
testMutex.lock();
|
||||
Thread thr;
|
||||
@ -99,7 +99,7 @@ void NamedMutexTest::testLock()
|
||||
thr.join();
|
||||
assertTrue (tl.timestamp() > now);
|
||||
}
|
||||
catch(Poco::NotImplementedException e)
|
||||
catch(Poco::NotImplementedException& e)
|
||||
{
|
||||
#if POCO_OS != POCO_OS_ANDROID
|
||||
throw e;
|
||||
@ -117,7 +117,7 @@ void NamedMutexTest::testTryLock()
|
||||
#if POCO_OS != POCO_OS_ANDROID
|
||||
assertTrue (ttl1.locked());
|
||||
#endif
|
||||
try
|
||||
try
|
||||
{
|
||||
testMutex.lock();
|
||||
Thread thr2;
|
||||
@ -127,7 +127,7 @@ void NamedMutexTest::testTryLock()
|
||||
testMutex.unlock();
|
||||
assertTrue (!ttl2.locked());
|
||||
}
|
||||
catch(Poco::NotImplementedException e)
|
||||
catch(Poco::NotImplementedException& e)
|
||||
{
|
||||
#if POCO_OS != POCO_OS_ANDROID
|
||||
throw e;
|
||||
|
Loading…
x
Reference in New Issue
Block a user