Files
pplus-core/mojo/probes/dict-missing-key.mojo
T
2026-10-05 03:03:38 +00:00

8 lines
189 B
Mojo

# probe: what does reading a missing Dict key raise, and how is it printed?
def main() raises:
var d = {"a": 1}
try:
print(d["b"])
except e:
print("caught:", e)