[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [4965] Improve robustness
From: |
Greg Chicares |
Subject: |
[lmi-commits] [4965] Improve robustness |
Date: |
Sun, 30 May 2010 22:43:20 +0000 |
Revision: 4965
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4965
Author: chicares
Date: 2010-05-30 22:43:19 +0000 (Sun, 30 May 2010)
Log Message:
-----------
Improve robustness
Modified Paths:
--------------
lmi/trunk/dbdict.cpp
Modified: lmi/trunk/dbdict.cpp
===================================================================
--- lmi/trunk/dbdict.cpp 2010-05-27 01:58:39 UTC (rev 4964)
+++ lmi/trunk/dbdict.cpp 2010-05-30 22:43:19 UTC (rev 4965)
@@ -33,6 +33,7 @@
#include "data_directory.hpp"
#include "dbnames.hpp"
#include "global_settings.hpp"
+#include "handle_exceptions.hpp"
#include "mc_enum_type_enums.hpp"
#include "miscellany.hpp"
#include "oecumenic_enumerations.hpp"
@@ -159,7 +160,9 @@
{
InvalidateCache();
fatal_error()
- << "is not up to date or is corrupted."
+ << "File '"
+ << filename
+ << "' is not up to date or is corrupted."
<< " It should contain " << NumberOfEntries
<< " elements, but it actually contains " << dictionary_.size()
<< " elements."
@@ -773,8 +776,15 @@
{
continue;
}
-
- DBDictionary::instance().Init(i->string());
+ try
+ {
+ DBDictionary::instance().Init(i->string());
+ }
+ catch(...)
+ {
+ report_exception();
+ continue;
+ }
fs::path out_file = fs::change_extension(*i, ".dbt");
fs::ofstream os(out_file, ios_out_trunc_binary());
dict_map const& dictionary = DBDictionary::instance().GetDictionary();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [4965] Improve robustness,
Greg Chicares <=