1
0
Fork 0

make sure that a die() (e.g. caused by an IOrules file being read protected)

doesn't disable the whole security mechanism
This commit is contained in:
mfranz 2008-06-16 11:19:29 +00:00
parent 94e010e4d1
commit ab08bfb8eb

View file

@ -185,7 +185,13 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
return 1;
}
load_rules(home ~ "/" ~ config) or load_rules(root ~ "/" ~ config);
# catch exceptions so that a die() doesn't ruin everything
call(func load_rules(home ~ "/" ~ config) or load_rules(root ~ "/" ~ config), nil, var err = []);
if(size(err)) {
debug.printerror(err);
read_rules = write_rules = [];
}
read_rules = [["*/" ~ config, 0]] ~ read_rules;
write_rules = [["*/" ~ config, 0]] ~ write_rules;
if(getprop("/sim/logging/priority") == "info") {