hautils

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 15a34b2c66486c6a8f168f004d1d1af2396788a1
parent 9efbbdbfab68a665e0ce60f92407645b37d56ba0
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun, 17 Apr 2022 20:11:23 -0400

nl: propagate errors in println

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mnl.ha | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nl.ha b/nl.ha @@ -225,16 +225,16 @@ export fn utilmain() (void | main::error) = { switch (section) { case section::HEAD => - println(line, head_style, &ctx); + println(line, head_style, &ctx)?; case section::BODY => - println(line, body_style, &ctx); + println(line, body_style, &ctx)?; case section::FOOT => - println(line, foot_style, &ctx); + println(line, foot_style, &ctx)?; }; }; }; -fn println(line: str, style: style, ctx: *context) void = { +fn println(line: str, style: style, ctx: *context) (void | io::error) = { switch (style) { case style::ALL => if (!isblank(line)) {