Try to flag file as failed on std::bad_alloc
commit23173d6cbb83d8b10c588a4245adcf3c8fd97fd8
authorOlly Betts <olly@survex.com>
Fri, 21 Sep 2018 02:34:46 +0000 (21 14:34 +1200)
committerOlly Betts <olly@survex.com>
Fri, 21 Sep 2018 02:36:51 +0000 (21 14:36 +1200)
tree450add95756ad70a30d8b64134efe17ec471cbf5
parent714fc4cc508b04a5439b33cb72587b4e25faeef8
Try to flag file as failed on std::bad_alloc

If we catch std::bad_alloc while trying to index a file that's a
sign that it may be a pathological case.  Rather than letting the
indexing get stuck on such files it makes more sense to flag them
as failed so they are skipped on future runs like other problematic
files (assuming we don't run out of memory again trying to commit
the changes).

(cherry picked from commit 8f3c9f76eb9cf0f84ca8aa00284c71b50adb1a51)
xapian-applications/omega/index_file.cc