Build Version : T2.5.0.18164 Firebird 2.5 Unstable
(writeBuildNum.sh,v 1.18324 2008/01/31 12:01:10 alexpeshkof )
Update of /cvsroot/firebird/firebird2/src/common/classes
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6516
Modified Files:
init.cpp
Log Message:
Ignore exceptions in destructors in release build
Index: init.cpp
===================================================================
RCS file: /cvsroot/firebird/firebird2/src/common/classes/init.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -U3 -r1.1 -r1.2
--- init.cpp 23 Jan 2008 15:55:21 -0000 1.1
+++ init.cpp 31 Jan 2008 12:01:03 -0000 1.2
@@ -37,6 +37,13 @@
namespace
{
+ void cleanError()
+ {
+#ifdef DEV_BUILD
+ // we do not have big choice in error reporting when running destructors
+ abort();
+#endif
+ }
// This helps initialize globals, needed before regular ctors run
bool initDone = false;
@@ -44,9 +51,23 @@
void allClean()
{
Firebird::InstanceControl::destructors();
+ try
+ {
Firebird::StaticMutex::release();
+ }
+ catch(...)
+ {
+ cleanError();
+ }
+ try
+ {
Firebird::MemoryPool::cleanup();
}
+ catch(...)
+ {
+ cleanError();
+ }
+ }
#ifndef DEBUG_INIT
// This class with it's single instance ensures global cleanup
@@ -98,14 +119,28 @@
// Call gds__cleanup() if present
if (gdsCleanup)
{
+ try
+ {
gdsCleanup();
}
+ catch(...)
+ {
+ cleanError();
+ }
+ }
// Destroy global objects
for (InstanceControl* i = instanceList; i; i = i->next)
{
+ try
+ {
i->dtor();
}
+ catch(...)
+ {
+ cleanError();
+ }
+ }
}
void InstanceControl::registerGdsCleanup(FPTR_VOID cleanup)
|