error handling

This commit is contained in:
2026-03-16 10:59:55 +01:00
parent 964bbe4ec0
commit 720218cf31
16 changed files with 138 additions and 58 deletions

View File

@@ -1,7 +1,5 @@
func main[] : i64
let s: i64 = net.listen(net.pack_addr(127, 0, 0, 1), 8000)
if s < 0
panic("failed to bind a socket")
let s: i64 = must(net.listen?(net.pack_addr(127, 0, 0, 1), 8000))
io.println("Listening on port 8000...")
let resp: str = mem.alloc(60000)