mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: make listen/bind errors more informative
This commit is contained in:
@@ -20,6 +20,10 @@ pub const (
|
||||
err_timed_out_code = errors_base + 9
|
||||
)
|
||||
|
||||
pub fn socket_error_message(potential_code int, s string) ?int {
|
||||
return socket_error(potential_code) or { return error('$err.msg; $s') }
|
||||
}
|
||||
|
||||
pub fn socket_error(potential_code int) ?int {
|
||||
$if windows {
|
||||
if potential_code < 0 {
|
||||
|
||||
Reference in New Issue
Block a user