docs(closed-traits): classify every public std error type in the table of 7.3 #790
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!790
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/744-error-classification"
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?
Refs #713
Closes #744
Classifies every public error type of
stdin the table of decision 7.3 ofdocs/design/CLOSED-TRAITS.md. Documentation only: nothing understd/orcompiler/changes, no seed impact.What changes
CliError,ResourceError,StorageFailure,CipherError,FramingError,PoolError,JsonPointerProblem,PatchProblem): all stay types with cases.SignatureError6 (was 4),UriError12 (was 11).SignatureErrormoves from "stays" to newtype. It already grew from 4 to 6 cases with P-256 and RSA and mirrors an open set of key and signature formats, so rule 1 would be broken by the next algorithm. Section 7.3 prose and 9.3 now list it with the newtypes. Say so if you would rather keep it frozen.*Problemtype (shared context, kinds complete for a fixed specification).StorageFailureis not renamed (open owner question in the audit report).SignatureError.Every
public typewithcasemembers understd/*/srcnamed*Error,*Failureor*ProblemCipherError(2 cases,std/cipher/src/error.trb)CliError(8 cases,std/cli/src/error.trb)DnsError(8 cases,std/dns/src/error.trb)ExtractError(2 cases,std/archive/src/extract.trb)FramingError(2 cases,std/stream/src/reader.trb)JsonPointerProblem(7 cases,std/json/src/pointer.trb)OsError(5 cases,std/os/src/error.trb)PatchProblem(7 cases,std/json-patch/src/error.trb)PathError(2 cases,std/path/src/error.trb)PoolError(2 cases,std/task/src/pool.trb)ReadError(7 cases,std/binary/src/error.trb)ResourceError(4 cases,std/resource/src/error.trb)SignatureError(6 cases,std/signature/src/error.trb)StorageFailure(5 cases,std/storage/src/storage.trb)UriError(12 cases,std/uri/src/error.trb)Produced by an awk pass over
std/*/src/*.trb(type headers by name suffix, then indentedcaselines up to the next type).Unverified until CI
Docs gates (
docs check, format) were not run locally; CI covers them. The verdict forSignatureErroris the judgement call above.Approved at
d18c3c1. Checklist:SignatureError6,UriError12,CliError8,ResourceError4,StorageFailure5,CipherError2,FramingError2,PoolError2,JsonPointerProblem7,PatchProblem7. All match the table and the PR list. My own sweep ofstd/*/srcfor public types with cases named*Error/*Failure/*Problemfinds the same 15 types, none missing. OK.docs/design/CLOSED-TRAITS.md, nothing understd/orcompiler/). The #713 step 7.3 checklist line forSignatureErroris in the issue body. OK.SignatureErrorverdict change (stays -> newtype) is justified in the PR body (4 -> 6 cases, open set of key and signature formats, rule 1). It is decided on its stated rationale, and 7.3 prose, 9.3 and the table are consistent with it. OK.Non-blocking:
std/http/src/h2frame.trbhaspublic type ErrorCodewith cases. It mirrors the open HTTP/2 error-code registry, so it looks like a newtype candidate. It falls outside the #744 name-suffix criterion, so consider a follow-up issue or a one-line note in the table.