From 50e9103593a6dc470748e775dc356870838fa487 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Tue, 26 Jun 2018 16:22:16 +0000 Subject: [PATCH] added description to KeyNotFoundException raised --- moo/kernel/Collect.moo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moo/kernel/Collect.moo b/moo/kernel/Collect.moo index 7304a75..1aec441 100644 --- a/moo/kernel/Collect.moo +++ b/moo/kernel/Collect.moo @@ -1007,7 +1007,7 @@ class AssociativeCollection(Collection) { | ass | ass := self __find: key or_upsert: false with: nil. - if (ass isError) { ^KeyNotFoundException signal }. + if (ass isError) { ^KeyNotFoundException signal: ('Unable to find ' & (key asString)) }. ^ass value } @@ -1116,7 +1116,7 @@ class AssociativeCollection(Collection) { | index | index := self __find_index: key. - if (index isError) { ^KeyNotFoundException signal. }. + if (index isError) { ^KeyNotFoundException signal: ('Unable to find ' & (key asString)). }. ^self __remove_at: index. }