Errors Are Values¶
Exercise: 40k_filesystem · Thu Nov 5 · Length: 5:50 · Lecture: Week 11 · Errors as values, behind one lock · Explainer: Errors Are Values
A narrated walk through the explainer, for after the Nov 3 lecture and before
Thursday's session: every call that can fail answers with a value, Ok with a
number or Err with the fact that went wrong. The video steps through the
given dircreate, where one Err is the answer a create wants, then through
the given 40k test call by call, watching each answer and each check. Three
broken cases follow, with what the test printed for each in a real run: the
untouched skeleton, a lookup that compares all 14 bytes, and a write that never
sets the size. The video ends on the test's checks, how to read the line it
prints, and what the test cannot see. It shows no solution code: only the inode
table and each call's Result, with the given test's own names.
Download the video (MP4, 9 MB) · Captions (WebVTT) · All five Week 11 videos