zeek/auxil/spicy/doc/programming/examples/_parse-requires-with-error.spicy
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

9 lines
224 B
Plaintext

# Automatically generated; edit in Sphinx source code, not here.
module Test;
import spicy;
public type Foo = unit {
x: int8 &requires=($$ < 5 : "x is too large"); # custom error message
on %done { print self; }
};