fix(runtime,voxel,graphics): script stacks, voxel pick, 3D present hitch
Surface throw-site file:line on caught Squirrel errors, skip empty deferred graphs that hitch orbit, and drive voxel place/break from a single Camera3D. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
40a03e4c8a
commit
eb39d162b7
32 files changed
+810
-186
No files matched your search
@@ -109,6 +109,24 @@ outer();
|
||||
CHECK(caught);
|
||||
}
|
||||
|
||||
TEST_CASE("runtimeCaughtErrorExposesThrowSiteViaLastScriptError") {
|
||||
Runtime runtime(256, ssq::Libs::ALL);
|
||||
runtime.initialize();
|
||||
runtime.runSource(R"SQ(
|
||||
function boom() { throw "kaboom" }
|
||||
function outer() { boom() }
|
||||
try { outer() } catch (e) {
|
||||
caught_stack <- eve.lastScriptError()
|
||||
}
|
||||
)SQ",
|
||||
"caught.nut");
|
||||
const std::string report = runtime.vm().find("caught_stack").toString();
|
||||
CHECK(report.find("kaboom") != std::string::npos);
|
||||
CHECK(report.find("caught.nut") != std::string::npos);
|
||||
CHECK(report.find("Stack:") != std::string::npos);
|
||||
CHECK(report.find("boom") != std::string::npos);
|
||||
}
|
||||
|
||||
TEST_CASE("runtimeRuntimeErrorMarksScriptFailedAndRestoresStack") {
|
||||
Runtime runtime(256, ssq::Libs::ALL);
|
||||
const SQInteger top = runtime.vm().getTop();
|
||||
|
||||
Reference in new issue
Block a user