fix(script): a script that throws anything at all exits 1
RunScript caught std::exception only. Anything else a script threw went on across the project.so boundary, and crafter-build ended in std::terminate instead of reporting the script's failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
631c60892a
commit
959c65dbb2
2 changed files with 6 additions and 0 deletions
|
|
@ -96,5 +96,9 @@ returned; ctx.args holds the arguments.)msg");
|
|||
Progress::Clear();
|
||||
std::println(std::cerr, "script '{}' failed: {}", found->name, e.what());
|
||||
return 1;
|
||||
} catch (...) {
|
||||
Progress::Clear();
|
||||
std::println(std::cerr, "script '{}' failed: it threw something that isn't a std::exception", found->name);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue