summaryrefslogtreecommitdiff
path: root/NetworkMessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkMessage.cpp')
-rw-r--r--NetworkMessage.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/NetworkMessage.cpp b/NetworkMessage.cpp
index b1ad0f11..5af133c7 100644
--- a/NetworkMessage.cpp
+++ b/NetworkMessage.cpp
@@ -4,6 +4,7 @@
#include <QString>
#include <QByteArray>
+#include <QDebug>
#include "pimpl_impl.hpp"
@@ -88,9 +89,13 @@ namespace NetworkMessage
*parent >> type >> id_;
if (type >= maximum_message_type_)
{
- throw std::runtime_error {"Unrecognized message type"};
+ qDebug () << "Unrecognized message type:" << type << "from id:" << id_;
+ type_ = maximum_message_type_;
+ }
+ else
+ {
+ type_ = static_cast<Type> (type);
}
- type_ = static_cast<Type> (type);
}
quint32 schema_;