{"id":"language--error-values","name":"Typed error values","owner":"yeho","package":"language","kind":"language","signature":"error problem = Error(type, message)","description":"error is a typed value created with Error(type, message) and exposes type and message fields.","context":"Use an error value when failure needs to cross a function or task boundary with machine-readable identity and a human-readable explanation.","parameters":[],"returns":"","members":[],"tags":["Error","cpu","error","errors","language","message","type","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"errors-tasks-effects-2026.1.json; language-core.md §6"},"status":"experimental","notes":["Errors and contracts are experimental.","Prefer stable error type strings that callers can test without parsing prose."],"examples":[{"id":"complete-0","title":"Name the failure","description":"Use an error value when failure needs to cross a function or task boundary with machine-readable identity and a human-readable explanation.","code":"error problem = Error(\"save.denied\", \"The project folder is read only\")\nConsole.Error(problem.type + \": \" + problem.message)\n","tags":["cpu","language"],"run":"cpu-oracle","expected":null,"verifyRun":false,"manifest":"manifestVersion = \"2\"\npackage = \"api.example.language__error_values\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","verification":"type checked","sha256":"6a254b884915dc06955eebff253e12fb7a292066e692efa1b9e6f8c0776301a5","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=language--error-values","json":"https://demonhunterlabs.com/reference/items/language--error-values.json","markdown":"https://demonhunterlabs.com/reference/text/language--error-values.md"}
