การเรนเดอร์th-TH

ข้อผิดพลาด

Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.

Marks a function parameter or binding as carrying an error value.

Syntax: ฟังก์ชัน <name>(...) ข้อผิดพลาด <ident> → <type>

Category#

function

Examples#

radix/corpus/errata/errata.fab (canonical · keyword)#

Marks a function parameter or binding as carrying an error value.

# =============================================================================
# ข้อผิดพลาด — Marks a function parameter or binding as carrying an error value.
# =============================================================================
#
# What this teaches:
#   • Error channel parameter — `ข้อผิดพลาด <type>` marks a function as having a typed error channel, enabling structured error handling.
#   • Declaration-only — currently a declaration-only modifier; the error channel is whitelisted for syntax validation and future codegen.
#
# Common mistakes:
#   • Confusing ข้อผิดพลาด with a ⊥ default — `ข้อผิดพลาด` declares a typed error parameter on a function; `⊥` provides an inline default on แปลง.
#
# See also: ⇥, จับ, โยน
# =============================================================================

# ข้อผิดพลาด — typed error channel parameter
#
# GRAMMAR:
#   funcModifier :← 'ข้อผิดพลาด' type
#
# EXPECTED OUTPUT:
#   No เริ่ม — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only error channel (whitelist: ข้อผิดพลาด/errata.fab).
#

fn parse(string raw) errors string → int {
    return 0
}