language · language ·

Typed error values

error is a typed value created with Error(type, message) and exposes type and message fields.

Errorcpuerrorerrorslanguagemessagetypeyeho

Use an error value when failure needs to cross a function or task boundary with machine-readable identity and a human-readable explanation.

error problem = Error(type, message)

Status: experimental

Name the failure

Use an error value when failure needs to cross a function or task boundary with machine-readable identity and a human-readable explanation.

cpu · language · type checked

error problem = Error("save.denied", "The project folder is read only")
Console.Error(problem.type + ": " + problem.message)
project.mech
manifestVersion = "2"
package = "api.example.language__error_values"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

Errors and contracts are experimental.

Prefer stable error type strings that callers can test without parsing prose.

yeho/errors-tasks-effects-2026.1.json; language-core.md §6