Fixed read tag to throw exception on file error unstead of looping forever.

This commit is contained in:
Brad Arant committed 2024-10-31 16:05:46 -07:00
1 parent bff2b4d2c5
commit 527e8bf778
4 files changed
+11 -8

No files matched your search

+2
View File
@@ -14,6 +14,8 @@ namespace jet {
if(hasContainer)
throw coreutils::Exception("read tag does not have a container.");
fd = open(variables["file"].c_str(), O_RDONLY);
if(fd < 0)
throw coreutils::Exception("file name is not found.");
global.variables[variables["name"]].read(fd);
close(fd);
}