Documentation
¶
Overview ¶
Package csv declares the error codes and the sentinels of the CSV codec, internal/service/data/codec/csv — range 0.3.8.* (ADR 0005 service/data/codec/csv block).
The codes live in the core at the path that mirrors the package emitting them (ADR 0160 §2) and keep the values they were allocated with: the LL byte 3 records the layer that allocated the range, not the directory that declares it today (ADR 0160 §3). Nothing here encodes or decodes — the mechanism, and the constructors that attach a failure's detail, stay in the service package.
Package csv — the sentinel *errs.Error values, one per code. Each Reason derives from its var name or from its Code constant (ADR 0020); the Public and Private texts are the ones the service package always emitted, so moving the declaration changed no rendering.
Index ¶
Constants ¶
const CodeCSVMarshalFailed errs.Code = 0x00_03_08_01 // 0.3.8.1
CodeCSVMarshalFailed identifies a failure inside encoding/csv.Writer.
const CodeCSVUnmarshalFailed errs.Code = 0x00_03_08_02 // 0.3.8.2
CodeCSVUnmarshalFailed identifies a failure inside encoding/csv.Reader.
const CodeCSVValueInvalid errs.Code = 0x00_03_08_03 // 0.3.8.3
CodeCSVValueInvalid identifies a Marshal / Unmarshal call whose target is not a *[][]string (CSV only serialises a records matrix).
Variables ¶
var ( // MarshalFailed wraps a failure from encoding/csv.Writer.Write(All). MarshalFailed = errs.Static(CodeCSVMarshalFailed, "MARSHAL_FAILED", "CSV encoding failed", "service/data/codec/csv: encoding/csv.Writer.WriteAll returned an error", 0, 0) // UnmarshalFailed wraps a failure from encoding/csv.Reader.ReadAll. UnmarshalFailed = errs.Static(CodeCSVUnmarshalFailed, "UNMARSHAL_FAILED", "CSV decoding failed", "service/data/codec/csv: encoding/csv.Reader.ReadAll returned an error", 0, 0) // ValueInvalid fires when the caller does not pass a *[][]string. ValueInvalid = errs.Static(CodeCSVValueInvalid, "VALUE_INVALID", "CSV codec requires a [][]string value", "service/data/codec/csv: Marshal/Unmarshal called with non-[][]string argument", 0, 0) )
Functions ¶
This section is empty.
Types ¶
This section is empty.