diff options
author | Araq <rumpf_a@web.de> | 2014-08-23 01:43:49 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-23 01:43:49 +0200 |
commit | 2f43fdb8379acd783beee58b1b2c8225a486a70c (patch) | |
tree | 3381ea28e5c2709bafeaf31eb8a7cc9b15c8b8b2 /lib/pure/collections/tables.nim | |
parent | fc0fda14ae1caf83d1b39029bebb702ff306b1e0 (diff) | |
download | Nim-2f43fdb8379acd783beee58b1b2c8225a486a70c.tar.gz |
renamefest
Diffstat (limited to 'lib/pure/collections/tables.nim')
-rw-r--r-- | lib/pure/collections/tables.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index dcf2ab481..95caf9195 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -144,7 +144,7 @@ proc mget*[A, B](t: var TTable[A, B], key: A): var B = ## If `key` is not in `t`, the ``EInvalidKey`` exception is raised. var index = rawGet(t, key) if index >= 0: result = t.data[index].val - else: raise newException(EInvalidKey, "key not found: " & $key) + else: raise newException(KeyError, "key not found: " & $key) iterator allValues*[A, B](t: TTable[A, B]; key: A): B = ## iterates over any value in the table `t` that belongs to the given `key`. @@ -411,7 +411,7 @@ proc mget*[A, B](t: var TOrderedTable[A, B], key: A): var B = ## If `key` is not in `t`, the ``EInvalidKey`` exception is raised. var index = rawGet(t, key) if index >= 0: result = t.data[index].val - else: raise newException(EInvalidKey, "key not found: " & $key) + else: raise newException(KeyError, "key not found: " & $key) proc hasKey*[A, B](t: TOrderedTable[A, B], key: A): bool = ## returns true iff `key` is in the table `t`. @@ -663,7 +663,7 @@ proc mget*[A](t: var TCountTable[A], key: A): var int = ## If `key` is not in `t`, the ``EInvalidKey`` exception is raised. var index = rawGet(t, key) if index >= 0: result = t.data[index].val - else: raise newException(EInvalidKey, "key not found: " & $key) + else: raise newException(KeyError, "key not found: " & $key) proc hasKey*[A](t: TCountTable[A], key: A): bool = ## returns true iff `key` is in the table `t`. |