diff options
| author | ruki <[email protected]> | 2026-07-12 20:33:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-07-12 20:35:03 +0800 |
| commit | fa89f0a96449a880b4d7a01bad80f9675e2eae2d (patch) | |
| tree | 90eb39b294579dcc3af9bb78ec416fd8ae7f49db /xmake/core/project/project.lua | |
| parent | ee1256b0921f0e6318b092e6635b8674671297b0 (diff) | |
improve error tipserrs
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index ff770ced0..d1030f130 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -1324,6 +1324,11 @@ function project.mtimes() return mtimes end +-- get the error of loading the project file when building the option menu +function project.menu_load_error() + return project._memcache():get("menu_load_error") +end + -- get the project menu function project.menu() @@ -1341,7 +1346,12 @@ function project.menu() -- failed? if not options then - if errors then utils.error(errors) end + -- record the error and let main() report it once and exit, instead of continuing into + -- config/build and reporting it again. we cannot abort here directly, because we are inside + -- the sandboxed menu loader, which would wrap the clean error with extra prefixes. + if errors then + project._memcache():set("menu_load_error", errors) + end return {} end |
