Skip to content

Commit 54be41b

Browse files
committed
builtin: implement TODO in panic_lasterr
1 parent b4cc0f4 commit 54be41b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎vlib/builtin/builtin_nix.c.v‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ fn break_if_debugger_attached() {
2121

2222
@[noreturn]
2323
pub fn panic_lasterr(base string) {
24+
cerrno := C.errno
25+
se := unsafe { tos_clone(&u8(C.strerror(cerrno))) }
2426
// TODO: use strerror_r and errno
25-
panic(base + ' unknown')
27+
panic(base + se)
2628
}

0 commit comments

Comments
 (0)