Fixed read tag to throw exception on file error unstead of looping forever.
This commit is contained in:
1 parent
bff2b4d2c5
commit
527e8bf778
4 files changed
+11
-8
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user