Date: Tuesday, December 5, 2006 @ 01:49:19
  Author: marc
    Path: /cvsroot/carob/carob

Modified: include/CarobException.hpp (1.51 -> 1.52) src/CarobException.cpp
          (1.21 -> 1.22) test/CarobProtector.hpp (1.18 -> 1.19)

moved pretty-printer operator<< for whole CarobException into 
CarobException.cpp file


----------------------------+
 include/CarobException.hpp |    4 ++++
 src/CarobException.cpp     |   18 ++++++++++++++++++
 test/CarobProtector.hpp    |   18 ------------------
 3 files changed, 22 insertions(+), 18 deletions(-)


Index: carob/include/CarobException.hpp
diff -u carob/include/CarobException.hpp:1.51 
carob/include/CarobException.hpp:1.52
--- carob/include/CarobException.hpp:1.51       Tue Dec  5 01:13:16 2006
+++ carob/include/CarobException.hpp    Tue Dec  5 01:49:19 2006
@@ -150,6 +150,10 @@
   CarobException & operator =( CarobException & forbidden);
 };
 
+std::wostream&
+operator<<(std::wostream& outstream, const CarobException& ce);
+
+
 /**
  * The goal UnexpectedException of is to prevent from having a 
std::unexpected() 
  * call when a function throws an exception not declared in its prototype. 
Thus,
Index: carob/src/CarobException.cpp
diff -u carob/src/CarobException.cpp:1.21 carob/src/CarobException.cpp:1.22
--- carob/src/CarobException.cpp:1.21   Tue Dec  5 01:13:16 2006
+++ carob/src/CarobException.cpp        Tue Dec  5 01:49:19 2006
@@ -178,6 +178,24 @@
 }
 
 
+std::wostream&
+CarobNS::operator<<(std::wostream& woss, const CarobNS::CarobException& ce)
+{
+    woss << " SQL state: " << ce.getSQLState() << std::endl;
+    woss << ce.getBackTrace();
+    woss << "      -- remote stack -- " << std::endl;
+    woss <<  ce.getStackTrace();
+
+    const CarobNS::CarobException* nextex_p = ce.getNext();
+    
+    if (nextex_p != NULL) {
+        woss << "   ---  chained CarobException  --- ";
+        woss << *nextex_p;
+  }
+
+  return woss;
+}
+
 /*
  * Local Variables:
  * c-file-style: "bsd"
Index: carob/test/CarobProtector.hpp
diff -u carob/test/CarobProtector.hpp:1.18 carob/test/CarobProtector.hpp:1.19
--- carob/test/CarobProtector.hpp:1.18  Tue Dec  5 01:40:13 2006
+++ carob/test/CarobProtector.hpp       Tue Dec  5 01:49:19 2006
@@ -33,24 +33,6 @@
 static const std::wstring NEXTPREFIX(L"chained CarobException : ");
 
 
-
-std::wostream& operator<<(std::wostream& woss, const CarobNS::CarobException& 
ce)
-{
-    woss << " SQL state: " << ce.getSQLState() << std::endl;
-    woss << ce.getBackTrace();
-    woss << "      -- remote stack -- " << std::endl;
-    woss <<  ce.getStackTrace();
-
-    const CarobNS::CarobException* nextex_p = ce.getNext();
-    
-    if (nextex_p != NULL) {
-        woss << "   ---  chained CarobException  --- ";
-        woss << *nextex_p;
-  }
-
-  return woss;
-}
-
 static void cerrCarobExceptionChain(const std::wstring& prefix,
     const CarobNS::CarobException& ce)
 {

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

Reply via email to