diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/partitions.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/partitions.erl b/src/partitions.erl index ade8efe4..d64d405a 100644 --- a/src/partitions.erl +++ b/src/partitions.erl @@ -62,7 +62,12 @@ for_key(DbName, Key) -> end. all_parts(DbName) -> - ets:lookup(partitions, DbName). + case ets:lookup(partitions, DbName) of + [] -> + erlang:error(database_does_not_exist); + Else -> + Else + end. % %% @doc for the given key, return a list of {Node,Part} tuples. Nodes are both % %% primary and replication partner nodes, and should number N. |