recipes · recipe ·

Explain a failure kindly

Separate a machine-readable error from a helpful message.

cpurecipe

A program can be correct and still meet a failure: a folder might be read-only or an input file might be missing. Good error handling tells the person what happened and what they can do next. Yeho's experimental error value has a type and message. The type is a stable identity for code to inspect; the message explains the problem to a person. Creating this value alone does not throw it or perform a save.

start.yh

Status: complete-program

Explain a failure kindly

Separate a machine-readable error from a helpful message.

cpu · type checked

error problem = Error("save.denied", "Choose a folder you can write to.")
Console.Log(problem.type + ": " + problem.message)
project.mech
manifestVersion = "2"
package = "api.example.recipe__failures"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Expected output
save.denied: Choose a folder you can write to.
Notes and source

Write a message for a missing image. Include what could not load and one useful recovery action.

demonhunterlabs/app/lib/yeho-walkthrough.ts