SimonLSchlee / customerrors-sketch

a sketch for a custom errors library for zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

customerrors

This is a sketch for a library that implements custom errors with payloads for zig (without special language support). This is an exploration in what is possible in userspace without changing the language.

run

git clone https://github.com/SimonLSchlee/customerrors-sketch.git
cd customerrors-sketch
zig build run

To "disable" customerrors use zig build run -Dcustomerrors=false. The example fails with different errors randomly you can pass the rng seed with zig build run -- <seed>

About

a sketch for a custom errors library for zig

License:MIT License


Languages

Language:Zig 100.0%