mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-08 23:06:01 -04:00
First attempt to regulate errors.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"net"
|
||||
"strconv"
|
||||
|
||||
"github.com/v2ray/v2ray-core/common/errors"
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
)
|
||||
|
||||
@@ -41,7 +42,8 @@ func IPAddress(ip []byte, port uint16) Address {
|
||||
},
|
||||
}
|
||||
default:
|
||||
panic(log.Error("Unknown IP format: %v", ip))
|
||||
log.Error(errors.NewIPFormatError(ip).Error())
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user