diff options
author | Naios <naios-dev@live.de> | 2016-04-16 15:09:29 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-16 22:09:25 +0200 |
commit | 1e0a93d3d882e8ae445772225c02da89e4e4736c (patch) | |
tree | 5c63acdf71abadb9304f394a7fd1d1e7bd199342 | |
parent | 0257aa05280651b48e07e89950ad6ad5becfe9d2 (diff) |
Core/Scripting: Improve the error message when the script reloader fails to create a cache entry
(cherry picked from commit 8fa52860ab666c95579f6c44bca26a49f7414b14)
-rw-r--r-- | src/server/game/Scripting/ScriptReloadMgr.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index abaae1f958b..8b14ca8aeeb 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -782,15 +782,14 @@ private: _unique_library_name_counter++, path.extension().generic_string().c_str()); - if ([&] - { - boost::system::error_code code; - fs::copy_file(path, cache_path, fs::copy_option::fail_if_exists, code); - return code; - }()) + boost::system::error_code code; + fs::copy_file(path, cache_path, fs::copy_option::fail_if_exists, code); + if (code) { - TC_LOG_FATAL("scripts.hotswap", ">> Failed to create cache entry for module \"%s\"!", - path.filename().generic_string().c_str()); + TC_LOG_FATAL("scripts.hotswap", ">> Failed to create cache entry for module " + "\"%s\" at \"%s\" with reason (\"%s\")!", + path.filename().generic_string().c_str(), cache_path.generic_string().c_str(), + code.message().c_str()); // Find a better solution for this but it's much better // to start the core without scripts |