You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/01/10 08:02:34 UTC

svn commit: r494748 - /incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp

Author: jsdelfino
Date: Tue Jan  9 23:02:34 2007
New Revision: 494748

URL: http://svn.apache.org/viewvc?view=rev&rev=494748
Log:
Print a message describing the last Windows error when a Library cannot be loaded.

Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp?view=diff&rev=494748&r1=494747&r2=494748
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Library.cpp Tue Jan  9 23:02:34 2007
@@ -25,6 +25,8 @@
 #include "tuscany_sca_config.h"
 #endif
 
+#include <sstream>
+
 #include "tuscany/sca/util/Library.h"
 #include "tuscany/sca/util/Utils.h"
 #include "tuscany/sca/core/Exceptions.h"
@@ -32,7 +34,6 @@
 
 using namespace std;
 
-
 namespace tuscany
 {
     namespace sca
@@ -101,7 +102,10 @@
                 hDLL = LoadLibrary(dllName.c_str());
                 if (hDLL == NULL)
                 {
-                    msg = "Unable to load library: " + dllName;
+                    ostringstream msgs;
+                    msgs << "Unable to load library: " + dllName << ", error: ";
+                    Utils::printLastError(msgs);
+                    msg = msgs.str();
                 }
 #else
                 int l = name.length();



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org