diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-05-16 10:42:54 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-05-16 10:42:54 -0400 |
commit | 5c41870b1df650b874069095fab2d29e93c76d3f (patch) | |
tree | acbdeba2738a258f05b26c4f2597d7ba80fa7a2d /cpp/src/IceUtil/Exception.cpp | |
parent | Fixed ICE-710: error handling test for Unicode functions (diff) | |
download | ice-5c41870b1df650b874069095fab2d29e93c76d3f.tar.bz2 ice-5c41870b1df650b874069095fab2d29e93c76d3f.tar.xz ice-5c41870b1df650b874069095fab2d29e93c76d3f.zip |
Renamed wnativeToNative/nativeToWnative to wstringToString/stringToWstring
Diffstat (limited to 'cpp/src/IceUtil/Exception.cpp')
-rw-r--r-- | cpp/src/IceUtil/Exception.cpp | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 8498a6a5f55..36d3e017899 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -224,14 +224,14 @@ getStackTrace() // // Don't need to use pass a wide string converter in the bellow - // calls to wnativeToNative as the wide strings come from + // calls to wstringToString as the wide strings come from // Windows API. // BOOL ok = SymFromAddr(process, address, 0, symbol); if(ok) { #ifdef DBGHELP_TRANSLATE_TCHAR - s << IceUtil::wnativeToNative(converter, 0, symbol->Name); + s << IceUtil::wstringToString(symbol->Name, converter); #else s << symbol->Name; #endif @@ -240,7 +240,7 @@ getStackTrace() { s << " at line " << line.LineNumber << " in " #ifdef DBGHELP_TRANSLATE_TCHAR - << IceUtil::wnativeToNative(converter, 0, line.FileName); + << IceUtil::wstringToString(line.FileName, converter); #else << line.FileName; #endif @@ -552,6 +552,56 @@ IceUtil::IllegalArgumentException::reason() const return _reason; } +// +// IllegalConversionException +// + +const char* IceUtil::IllegalConversionException::_name = "IceUtil::IllegalConversionException"; + +IceUtil::IllegalConversionException::IllegalConversionException(const char* file, int line): + Exception(file, line) +{} + +IceUtil::IllegalConversionException::IllegalConversionException(const char* file, int line, + const string& reason): + Exception(file, line), + _reason(reason) +{} + +string +IceUtil::IllegalConversionException::ice_name() const +{ + return _name; +} + +void +IceUtil::IllegalConversionException::ice_print(ostream& out) const +{ + Exception::ice_print(out); + out << ": " << _reason; + +} + +IceUtil::IllegalConversionException* +IceUtil::IllegalConversionException::ice_clone() const +{ + return new IllegalConversionException(*this); +} + +void +IceUtil::IllegalConversionException::ice_throw() const +{ + throw *this; +} + +string +IceUtil::IllegalConversionException::reason() const +{ + return _reason; +} + + + IceUtil::SyscallException::SyscallException(const char* file, int line, int err ): Exception(file, line), _error(err) |