Merge pull request #1068 from ctrlaltca/fix_1063

Fix macro for MSVC; fix #1063
This commit is contained in:
ctrlaltca 2015-05-11 09:12:25 +02:00
commit 18da49d454

View file

@ -164,14 +164,24 @@ void ServerSocketInterface::readClient()
newCommandContainer.ParseFromArray(inputBuffer.data(), messageLength);
}
catch(std::exception &e) {
qDebug() << "Caught std::exception in" << __FILE__ << __LINE__ << __PRETTY_FUNCTION__;
qDebug() << "Caught std::exception in" << __FILE__ << __LINE__ <<
#ifdef _MSC_VER // Visual Studio
__FUNCTION__;
#else
__PRETTY_FUNCTION__;
#endif
qDebug() << "Exception:" << e.what();
qDebug() << "Message coming from:" << getAddress();
qDebug() << "Message length:" << messageLength;
qDebug() << "Message content:" << inputBuffer.toHex();
}
catch(...) {
qDebug() << "Unhandled exception in" << __FILE__ << __LINE__ << __PRETTY_FUNCTION__;
qDebug() << "Unhandled exception in" << __FILE__ << __LINE__ <<
#ifdef _MSC_VER // Visual Studio
__FUNCTION__;
#else
__PRETTY_FUNCTION__;
#endif
qDebug() << "Message coming from:" << getAddress();
}