summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-06 23:32:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-06 23:32:44 +0300
commitabe7009c7347dd2821bc687d8eb692bac2609bc2 (patch)
tree89abfab81beff37fc854c2e574a12fe0bc6f92b7 /src/net
parentba21ad5b52d75c98d15a547a64d246e576c1afc2 (diff)
downloadmanaplus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.gz
manaplus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.bz2
manaplus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.xz
manaplus-abe7009c7347dd2821bc687d8eb692bac2609bc2.zip
Show assert if failed open streamed files.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/packetlimiter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/packetlimiter.cpp b/src/net/packetlimiter.cpp
index 8c34b6919..dd54693b7 100644
--- a/src/net/packetlimiter.cpp
+++ b/src/net/packetlimiter.cpp
@@ -23,6 +23,7 @@
#include "configuration.h"
#include "settings.h"
+#include "utils/checkutils.h"
#include "utils/timer.h"
#include <fstream>
@@ -228,6 +229,8 @@ void PacketLimiter::writePacketLimits(const std::string &packetLimitsName)
outPacketFile.open(packetLimitsName.c_str(), std::ios::out);
if (!outPacketFile.is_open())
{
+ reportAlways("Error opening file for writing: %s",
+ packetLimitsName.c_str());
outPacketFile.close();
return;
}