Skip to content

Commit d3d7d8c

Browse files
committed
Fix the shape of missing dictionary key errors
* Now matches Mozart 1's and produces a nicely formatted error.
1 parent cd670ec commit d3d7d8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vm/vm/main/dictionary.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ UnstableNode Dictionary::dictGet(RichNode self, VM vm, RichNode feature) {
462462
if (dict.lookup(vm, feature, value)) {
463463
return { vm, *value };
464464
} else {
465-
raise(vm, "dictKeyNotFound", self, feature);
465+
raiseKernelError(vm, "dict", self, feature);
466466
}
467467
}
468468

@@ -503,7 +503,7 @@ UnstableNode Dictionary::dictExchange(RichNode self, VM vm, RichNode feature,
503503
value->copy(vm, newValue);
504504
return oldValue;
505505
} else {
506-
raise(vm, "dictKeyNotFound", self, feature);
506+
raiseKernelError(vm, "dict", self, feature);
507507
}
508508
}
509509

0 commit comments

Comments
 (0)