mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
Fix macro for MSVC; fix #1063
This commit is contained in:
parent
50ab6295c5
commit
590894d283
1 changed files with 12 additions and 2 deletions
|
|
@ -164,14 +164,24 @@ void ServerSocketInterface::readClient()
|
||||||
newCommandContainer.ParseFromArray(inputBuffer.data(), messageLength);
|
newCommandContainer.ParseFromArray(inputBuffer.data(), messageLength);
|
||||||
}
|
}
|
||||||
catch(std::exception &e) {
|
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() << "Exception:" << e.what();
|
||||||
qDebug() << "Message coming from:" << getAddress();
|
qDebug() << "Message coming from:" << getAddress();
|
||||||
qDebug() << "Message length:" << messageLength;
|
qDebug() << "Message length:" << messageLength;
|
||||||
qDebug() << "Message content:" << inputBuffer.toHex();
|
qDebug() << "Message content:" << inputBuffer.toHex();
|
||||||
}
|
}
|
||||||
catch(...) {
|
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();
|
qDebug() << "Message coming from:" << getAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue