Date: Thursday, January 11, 2007 @ 12:34:45
  Author: marc
    Path: /cvsroot/carob/carob/src

Modified: CarobException.cpp (1.27 -> 1.28)

pretty-printing of CarobException includes description (!)
UnexpectedException wrapping CarobException gets message of chained


--------------------+
 CarobException.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Index: carob/src/CarobException.cpp
diff -u carob/src/CarobException.cpp:1.27 carob/src/CarobException.cpp:1.28
--- carob/src/CarobException.cpp:1.27   Thu Jan 11 12:28:19 2007
+++ carob/src/CarobException.cpp        Thu Jan 11 12:34:45 2007
@@ -115,7 +115,9 @@
     woss << ce;
     if (isErrorEnabled())
         logError(L"convertUnexpectedException", woss.str());
-    throw UnexpectedException(L"Unexpected CarobException", ce.getSQLState(), 
&ce);
+    throw UnexpectedException(std::wstring(L"Unexpected CarobException: ")
+                                           + ce.description(),
+                              ce.getSQLState(), &ce);
   }
   catch(std::exception& stde)
   {
@@ -206,7 +208,8 @@
 std::wostream&
 CarobNS::operator<<(std::wostream& woss, const CarobNS::CarobException& ce)
 {
-    woss << " SQL state: " << ce.getSQLState() << std::endl;
+    woss << ce.description();
+    woss << "; SQL state: " << ce.getSQLState() << std::endl;
     woss << ce.getBackTrace();
     woss << "      -- remote stack -- " << std::endl;
     woss <<  ce.getStackTrace();

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to