docs(book): reference errors #835
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!835
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/620-reference-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #620
Slice of #590: the Reference page
book/reference/errors.md("Results and error types"), written tobook/CONCEPT.mdand modelled onbindings.mdandcases-and-patterns.md.What changed
book/reference/errors.md(new):ResultandOk/Fail, the success that is the value itself,Result<Void, _>withOk(void), the methods,??/orElse/expect, collecting with.to<Result<List<Int>, E>>(),?and the generatedFrom, two cases wrapping the same type (and the manualextend ... with From<...>), error types as types with cases, theErrortrait andcause(), and the absence oftry/catch/Err. Every run block carries its real output; every compiler error a reader can hit withResultor with implementingErrorhas atrb errorblock with the texttorb checkprints.book/reference/index.md: lists the page (generated).docs/language/errors/{result,error-types,the-error-trait}.mddeleted. Their claims aboutFromandErrorwere partly wrong against the compiler; the new page states the verified behaviour.question-mark.md,top-level-errors.mdorpanic.md. The three rows ofdocs/internals/inventory.mdare removed.skills/regenerated withtorb docs skill docs skills.Kept
docs/language/errors/index.mdstays as the folder index (its page list is regenerated). The four sibling pagesoption-chaining,panic,question-mark,top-level-errorsstay for the Language skill; they were edited only to change links to deleted pages. No page was kept that the skill needs only for the deleted content.Not changed
No syntax, native or
seed/change. No otherbook/page changed.reference/propagating-errors.mdandreference/panics.mdare not linked (not on main); the page links../tour/errors.mdand../guide/handling-errors.mdonly.Checked locally (nightly torb, VM only)
torb docs check bookandtorb docs check docswith--no-native --standard-library std,torb docs index --checkforbookanddocs,torb docs site book --check(71 pages, no broken link),torb docs skill docs skills --check(7 skills, 280 files).Not verified here
No C compiler in the worker environment, so the native half of the docs gate,
tools/gates.shand the pdisc check run only in forge CI.CI red on
c6bff12:ci / tier A (linux-x64)(and soci / gates), gatedocs check book:book/reference/errors.md:717: The native back end cannot build this block of astablepage:?whose error conversion the back end cannot build yet is not supported by the native back end yet. Show a form that builds, or say so on the page in a paragraph that opens with> Not built natively yet.``. Fix the block at line 717 (use a form the native back end builds, or add the "Not built natively yet" paragraph) and push; the next CI run brings me back for the review.Review of
a5c31dd(US English, checklist):?intoErrornot built natively) is fixed: the block is nowtrb checkunder the "Not built natively yet" paragraph.docs check book, link check, pdisc) are the tests and pass in CI.trb errorblocks quotetorb checktext; claims aboutFrom/Errorare stated as verified behavior.skills/regenerated. No syntax, native or seed change.errors.mdmatches the body; no INDEX.md in the diff.Non-blocking: none.