Date: Thursday, February 8, 2007 @ 15:25:10
  Author: gilles
    Path: /cvsroot/carob/carob

Modified: include/CarobException.hpp (1.54 -> 1.55) src/CarobException.cpp
          (1.29 -> 1.30)

Added CarobException wstring() cast operator


----------------------------+
 include/CarobException.hpp |    3 +++
 src/CarobException.cpp     |    8 ++++++++
 2 files changed, 11 insertions(+)


Index: carob/include/CarobException.hpp
diff -u carob/include/CarobException.hpp:1.54 
carob/include/CarobException.hpp:1.55
--- carob/include/CarobException.hpp:1.54       Mon Dec 18 17:42:55 2006
+++ carob/include/CarobException.hpp    Thu Feb  8 15:25:10 2007
@@ -121,6 +121,9 @@
   /** Retrieves the vendor-specific exception code */
   int getErrorCode() const { return errorCode; }
 
+  /** wstring cast operator - makes use of << operators */
+  operator std::wstring() const;
+   
 protected:
   /** Error message */
   std::wstring                message;
Index: carob/src/CarobException.cpp
diff -u carob/src/CarobException.cpp:1.29 carob/src/CarobException.cpp:1.30
--- carob/src/CarobException.cpp:1.29   Thu Jan 11 12:48:55 2007
+++ carob/src/CarobException.cpp        Thu Feb  8 15:25:10 2007
@@ -100,6 +100,14 @@
   sock>>SQLState;
   sock>>errorCode;
 }
+
+CarobException::operator std::wstring() const
+{
+  std::wostringstream woss;
+  woss << *this;
+  return woss.str();
+}
+
 void UnexpectedException::convertUnexpected()
 {
   try

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

Reply via email to