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:
@@ -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.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user