bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Win32 - src/serial.cpp Visual C++ 6.0 Build Error


From: Conrad T. Pino
Subject: Win32 - src/serial.cpp Visual C++ 6.0 Build Error
Date: Sat, 22 May 2004 22:30:57 -0700

Hi All,

File "src/serial.cpp" fails to build because Visual C++ 6.0
doesn't locate "String" constructor for throw "SerException"
"char *" argument.

While fixing I noted "SerException" constructor argument is
not consistent with other exception classes.

The patch following in this messages corrects these issues.

./ChangeLog:

- include/cc++/serial.h: Change argument "String str" to constant
  reference "const String &str" type.
- src/serial.cpp: Add explicit "String" constructor to "SerException"
  constructor invocation so Visual C++ 6.0 compiles.

Best regards,

Conrad Pino

Index: include/cc++/serial.h
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/include/cc++/serial.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 serial.h
--- include/cc++/serial.h       15 Dec 2003 19:27:19 -0000      1.1.1.1
+++ include/cc++/serial.h       23 May 2004 04:04:24 -0000
@@ -876,7 +876,7 @@ public:
 class __EXPORT SerException : public IOException
 {
 public:
-       SerException(String str) : IOException(str) {};
+       SerException(const String &str) : IOException(str) {};
 };
 #endif
 
Index: src/serial.cpp
===================================================================
RCS file: /cvsroot/cplusplus/commoncpp2/src/serial.cpp,v
retrieving revision 1.3
diff -u -p -r1.3 serial.cpp
--- src/serial.cpp      26 Jan 2004 17:22:53 -0000      1.3
+++ src/serial.cpp      23 May 2004 04:04:24 -0000
@@ -302,7 +302,7 @@ Serial::Error Serial::error(Error err, c
        {
                if(!errs)
                        errs = "";
-               throw(SerException(errs));
+               throw(SerException(String(errs)));
        }
 #endif
 #endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]