1
0
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:
V2Ray
2015-09-24 12:54:10 +02:00
parent 6ecb18268e
commit c138004bf9
6 changed files with 95 additions and 13 deletions

View File

@@ -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
}
}