summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-24 22:21:02 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-24 22:21:02 +0300
commit490a93a1d7a347ab586637bf9d8163e114285a02 (patch)
treecae315ef7502f6e9b4b55bd68bac66d5fb8e33ff /src/net
parenta5926417dad1f91966ccacfc5572369d309c59be (diff)
downloadplus-490a93a1d7a347ab586637bf9d8163e114285a02.tar.gz
plus-490a93a1d7a347ab586637bf9d8163e114285a02.tar.bz2
plus-490a93a1d7a347ab586637bf9d8163e114285a02.tar.xz
plus-490a93a1d7a347ab586637bf9d8163e114285a02.zip
Add safe error string reporting function.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/manaserv/network.cpp8
-rw-r--r--src/net/tmwa/network.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/net/manaserv/network.cpp b/src/net/manaserv/network.cpp
index 84e71eaf3..a75da3643 100644
--- a/src/net/manaserv/network.cpp
+++ b/src/net/manaserv/network.cpp
@@ -54,7 +54,7 @@ void initialize()
{
if (enet_initialize())
{
- logger->error("Failed to initialize ENet.");
+ logger->safeError("Failed to initialize ENet.");
}
#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
@@ -65,7 +65,7 @@ void initialize()
if (!client)
{
- logger->error("Failed to create the local host.");
+ logger->safeError("Failed to create the local host.");
}
}
@@ -76,7 +76,7 @@ void finalize()
if (connections)
{
- logger->error("Tried to shutdown the network subsystem while there "
+ logger->safeError("Tried to shutdown the network subsystem while there "
"are network connections left!");
}
@@ -88,7 +88,7 @@ Connection *getConnection()
{
if (!client)
{
- logger->error("Tried to instantiate a network object before "
+ logger->safeError("Tried to instantiate a network object before "
"initializing the network subsystem!");
}
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 6e9e367c0..b8ba7554e 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -236,7 +236,7 @@ void Network::dispatchMessages()
MessageHandlerIterator iter = mMessageHandlers.find(msg.getId());
if (msg.getLength() == 0)
- logger->error("Zero length packet received. Exiting.");
+ logger->safeError("Zero length packet received. Exiting.");
if (iter != mMessageHandlers.end())
{