summaryrefslogtreecommitdiff
path: root/src/gui/windows
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/gui/windows
parentba21ad5b52d75c98d15a547a64d246e576c1afc2 (diff)
downloadplus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.gz
plus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.bz2
plus-abe7009c7347dd2821bc687d8eb692bac2609bc2.tar.xz
plus-abe7009c7347dd2821bc687d8eb692bac2609bc2.zip
Show assert if failed open streamed files.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/shopwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 09686ecaf..0de38a084 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -75,6 +75,7 @@
#include "net/tradehandler.h"
#endif // TMWA_SUPPORT
+#include "utils/checkutils.h"
#include "utils/delete2.h"
#include "utils/gettext.h"
@@ -535,6 +536,8 @@ void ShopWindow::loadList()
shopFile.open(shopListName.c_str(), std::ios::in);
if (!shopFile.is_open())
{
+ reportAlways("Error opening file for reading: %s",
+ shopListName.c_str());
shopFile.close();
return;
}
@@ -589,7 +592,8 @@ void ShopWindow::saveList() const
shopFile.open(shopListName.c_str(), std::ios::binary);
if (!shopFile.is_open())
{
- logger->log1("Unable to open shoplist.txt for writing");
+ reportAlways("Error opening file writing: %s",
+ shopListName.c_str());
return;
}