This commit is contained in:
Brad Arant committed 2024-12-02 15:46:49 -08:00
1 parent ae57e06778
commit 90540d3c44
8 files changed
+493 -13

No files matched your search

+17 -1
View File
@@ -14,7 +14,23 @@ namespace jet {
coreutils::File file(variables["file"]);
file.read();
container = file.asZString();
processContainer(container);
try {
processContainer(container);
}
catch(coreutils::Exception e) {
container.setCursor(global.errorCursor);
container.moveBackToLineStart();
std::cout << "-----------------------------" << std::endl;
std::cout << "Error in included script '" << variables["file"] << "' at line " << container.getLineNumberAtCursor() << std::endl;
std::cout << "Error text: " << e.text << std::endl;
std::cout << "-----------------------------" << std::endl;
std::cout << container.parsed() << std::endl;
std::cout << "******** Error caught: " << e.text << std::endl;
std::cout << container.unparsed() << std::endl;
global.errorCursor = in.getCursor();
throw coreutils::Exception("error in included file.");
}
}
}