From 2c9fa536abee236bf9eeb6bcdfff341679f386fb Mon Sep 17 00:00:00 2001 From: MistEO Date: Tue, 11 Oct 2022 19:32:54 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MeoAssistant/Resource/AbstractConfiger.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MeoAssistant/Resource/AbstractConfiger.cpp b/src/MeoAssistant/Resource/AbstractConfiger.cpp index 9e1e2d1206..26f3812396 100644 --- a/src/MeoAssistant/Resource/AbstractConfiger.cpp +++ b/src/MeoAssistant/Resource/AbstractConfiger.cpp @@ -23,6 +23,10 @@ bool asst::AbstractConfiger::load(const std::filesystem::path& path) const auto& root = ret.value(); +#ifdef ASST_DEBUG + // 不捕获异常,可以通过堆栈更直观的看到资源存在的问题 + return parse(root); +#else try { return parse(root); } @@ -34,4 +38,5 @@ bool asst::AbstractConfiger::load(const std::filesystem::path& path) Log.error("Json parse failed", path, e.what()); return false; } +#endif }