Bernhard Roider wrote:
Hello Richard,
i think this patch changed the error detection a bit, see below
Right you are. Thanks for noticing.
rh
bernhard
[EMAIL PROTECTED] schrieb:
- if (!readTypeOrKey(entryType, ifs, from_ascii("{("),
- docstring(), makeLowerCase) || !ifs)
+ if (!ifs) {
+ lyxerr << "InsetBibtex::fillWithBibKeys: Unexpected
end of file." << std::endl;
continue;
+ }
+
+ if (!readTypeOrKey(entryType, ifs, from_ascii("{("),
docstring(), makeLowerCase)) {
+ lyxerr << "InsetBibtex::fillWithBibKeys: Error
reading entry type." << std::endl;
+ continue;
+ }
In the above code the order of !readTypeOrKey(...) and !ifs is
exchanged which is not correct imho because readTypeOrKey reads from ifs.
- if (!readTypeOrKey(name, ifs, from_ascii("="),
- from_ascii("#{}(),"),
makeLowerCase) || !ifs)
+ if (!ifs) {
+ lyxerr << "InsetBibtex::fillWithBibKeys:
Unexpected end of file." << std::endl;
continue;
+ }
+
+ if (!readTypeOrKey(name, ifs, from_ascii("="),
from_ascii("#{}(),"), makeLowerCase)) {
+ lyxerr << "InsetBibtex::fillWithBibKeys: Error
reading string name." << std::endl;
+ continue;
+ }
the same here...
- if (!readTypeOrKey(key, ifs, from_ascii(","),
- from_ascii("}"), keepCase) || !ifs)
+ if (!ifs) {
+ lyxerr << "InsetBibtex::fillWithBibKeys:
Unexpected end of file." << std::endl;
continue;
+ }
+
+ if (!readTypeOrKey(key, ifs, from_ascii(","),
from_ascii("}"), keepCase)) {
+ lyxerr << "InsetBibtex::fillWithBibKeys: Unable
to read key for entry type:" << +
entryType << "." << std::endl;
+ continue;
+ }
and here