From 3922fdd40a5cb465125712c46427283e4075c490 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 8 Feb 2021 20:53:39 +0100 Subject: [PATCH] Improved the logging when there are issues with invalid theme XML files. --- es-core/src/ThemeData.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index b6c6825ae..5d19b8908 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -299,10 +299,9 @@ void ThemeData::parseIncludes(const pugi::xml_node& root) std::string relPath = resolvePlaceholders(node.text().as_string()); std::string path = Utils::FileSystem::resolveRelativePath(relPath, mPaths.back(), true); if (!ResourceManager::getInstance()->fileExists(path)) - throw error << ": Included file \"" << relPath << + throw error << " -> \"" << relPath << "\" not found (resolved to \"" << path << "\")"; - - error << " from included file \"" << relPath << "\":\n "; + error << " -> \"" << relPath << "\""; mPaths.push_back(path); @@ -314,11 +313,11 @@ void ThemeData::parseIncludes(const pugi::xml_node& root) pugi::xml_parse_result result = includeDoc.load_file(path.c_str()); #endif if (!result) - throw error << "Error parsing file: \n " << result.description(); + throw error << ": Error parsing file: " << result.description(); pugi::xml_node theme = includeDoc.child("theme"); if (!theme) - throw error << "Missing tag"; + throw error << "Missing tag "; parseVariables(theme); parseIncludes(theme);