implements a fix for losing the ets dbs on a bad lookup

The `ezic_db` server would crash on a bad lookup (no_zone,
ambiguous_zone, etc.). The old error notification method for bad
lookups (crashing) was killing the server and apparently eliminating
the in-memory tables.
This commit is contained in:
aj heller
2012-12-17 15:59:33 -08:00
parent 52ad0119cb
commit d98eed7b52
2 changed files with 13 additions and 9 deletions

View File

@@ -34,11 +34,11 @@ flatzone(Date, TzName) ->
1 ->
hd(FlatZones);
2 ->
erlang:error(ambiguous_zone, FlatZones);
{error, {ambiguous_zone, FlatZones}};
0 ->
erlang:error(no_zone);
{error, no_zone};
_ ->
erlang:error(should_not_happen, {FlatZones, Date, TzName})
{error, {should_not_happen, {FlatZones, Date, TzName}}}
end.