Date: Friday, December 1, 2006 @ 22:27:14
Author: marc
Path: /cvsroot/carob/carob/test
Modified: CarobProtector.hpp (1.15 -> 1.16)
Now also printing backtraces of chained exceptions (since they are not buggy
anymore...)
--------------------+
CarobProtector.hpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
Index: carob/test/CarobProtector.hpp
diff -u carob/test/CarobProtector.hpp:1.15 carob/test/CarobProtector.hpp:1.16
--- carob/test/CarobProtector.hpp:1.15 Fri Dec 1 17:38:28 2006
+++ carob/test/CarobProtector.hpp Fri Dec 1 22:27:14 2006
@@ -34,7 +34,7 @@
static const std::wstring COPREFIX(L"ControllerException: ");
static const std::wstring CAPREFIX(L"CarobException: ");
static const std::wstring UEPREFIX(L"UnexpectedException: ");
-static const std::wstring NEXTPREFIX(L" next CarobException : ");
+static const std::wstring NEXTPREFIX(L"chained CarobException : ");
static void cerrStackTrace(const std::wstring& prefix,
@@ -43,6 +43,12 @@
std::wcerr << prefix << "SQL state: " << cex.getSQLState() << std::endl;
std::wcerr << prefix << "remote stack: " << std::endl;
const CarobNS::StackTrace& st = cex.getStackTrace();
+
+ if (st.size() == 0) {
+ std::wcerr << L" (empty/no remote stack trace)" << std::endl;
+ return;
+ }
+
for (CarobNS::StackTrace::const_iterator s = st.begin(); s != st.end(); s++)
std::wcerr << prefix << s->toWString() << std::endl;;
}
@@ -97,7 +103,8 @@
const CarobNS::CarobException* nextex_p = &ce;
while ((nextex_p = nextex_p->getNext()) != NULL) {
- std::wcerr << " Next CarobException" << std::endl;
+ std::wcerr << " --- chained CarobException --- " << std::endl;
+ cerrBackTrace(NEXTPREFIX, *nextex_p);
cerrStackTrace(NEXTPREFIX, *nextex_p);
}
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits