From 55743a3dbb9123d09019326c396dc23364f44aa1 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Wed, 22 Jan 2025 21:27:37 +0800 Subject: [PATCH] fix: fix compile --- src/legacy/api/APIHelp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/legacy/api/APIHelp.h b/src/legacy/api/APIHelp.h index d8f20e7..587ce32 100644 --- a/src/legacy/api/APIHelp.h +++ b/src/legacy/api/APIHelp.h @@ -65,7 +65,7 @@ inline void LOG_WRONG_ARGS_COUNT(std::string const& func = "") { #define CATCH(LOG) \ catch (const Exception& e) { \ ll::error_utils::printException(e, lse::LegacyScriptEngine::getInstance().getSelf().getLogger()); \ - lse::LegacyScriptEngine::getInstance().getSelf().getLogger("Stacktrace: {0}", e.stacktrace()); \ + lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error("Stacktrace: {0}", e.stacktrace()); \ LOG_ERROR_WITH_SCRIPT_INFO(__FUNCTION__, LOG); \ return Local(); \ } \ @@ -100,7 +100,7 @@ inline void LOG_WRONG_ARGS_COUNT(std::string const& func = "") { #define CATCH_C(LOG) \ catch (const Exception& e) { \ ll::error_utils::printException(e, lse::LegacyScriptEngine::getInstance().getSelf().getLogger()); \ - lse::LegacyScriptEngine::getInstance().getSelf().getLogger("Stacktrace: {0}", e.stacktrace()); \ + lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error("Stacktrace: {0}", e.stacktrace()); \ LOG_ERROR_WITH_SCRIPT_INFO(__FUNCTION__, LOG); \ return nullptr; \ } \ @@ -114,7 +114,7 @@ inline void LOG_WRONG_ARGS_COUNT(std::string const& func = "") { #define CATCH_S(LOG) \ catch (const Exception& e) { \ ll::error_utils::printException(e, lse::LegacyScriptEngine::getInstance().getSelf().getLogger()); \ - lse::LegacyScriptEngine::getInstance().getSelf().getLogger("Stacktrace: {0}", e.stacktrace()); \ + lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error("Stacktrace: {0}", e.stacktrace()); \ LOG_ERROR_WITH_SCRIPT_INFO(__FUNCTION__, LOG); \ return; \ } \ @@ -128,7 +128,7 @@ inline void LOG_WRONG_ARGS_COUNT(std::string const& func = "") { #define CATCH_WITHOUT_RETURN(LOG) \ catch (const Exception& e) { \ ll::error_utils::printException(e, lse::LegacyScriptEngine::getInstance().getSelf().getLogger()); \ - lse::LegacyScriptEngine::getInstance().getSelf().getLogger("Stacktrace: {0}", e.stacktrace()); \ + lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error("Stacktrace: {0}", e.stacktrace()); \ LOG_ERROR_WITH_SCRIPT_INFO(__FUNCTION__, LOG); \ } \ catch (...) { \ @@ -140,7 +140,7 @@ inline void LOG_WRONG_ARGS_COUNT(std::string const& func = "") { #define CATCH_IN_CALLBACK(callback) \ catch (const Exception& e) { \ ll::error_utils::printException(e, lse::LegacyScriptEngine::getInstance().getSelf().getLogger()); \ - lse::LegacyScriptEngine::getInstance().getSelf().getLogger("Stacktrace: {0}", e.stacktrace()); \ + lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error("Stacktrace: {0}", e.stacktrace()); \ lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error( \ std::string("In callback for ") + callback \ ); \