From abe7009c7347dd2821bc687d8eb692bac2609bc2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Mar 2017 23:32:44 +0300 Subject: Show assert if failed open streamed files. --- src/gui/windows/shopwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/windows') 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; } -- cgit v1.2.3-60-g2f50