1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net and http: more consistent error messages

This commit is contained in:
Delyan Angelov
2019-11-12 18:23:53 +02:00
committed by Alexander Medvednikov
parent 35741b46bd
commit 32473eeafe
5 changed files with 31 additions and 31 deletions

View File

@@ -7,7 +7,7 @@ pub fn hostname() ?string {
// The host name is returned as a null-terminated string.
res := C.gethostname(&name, 256)
if res != 0 {
return error('net.hostname() cannot get the host name')
return error('net.hostname: failed with $res')
}
return tos_clone(name)
}