1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 14:26:11 -04:00

refactor error messages

This commit is contained in:
Darien Raymond 2017-04-03 13:07:12 +02:00
parent 72d9cb8a74
commit c4ba853887
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -114,7 +114,7 @@ func (f FrameMetadata) AsSupplier() buf.Supplier {
func ReadFrameFrom(b []byte) (*FrameMetadata, error) {
if len(b) < 4 {
return nil, errors.New("Proxyman|Mux: Insufficient buffer.")
return nil, errors.New("Proxyman|Mux: Insufficient buffer: ", len(b))
}
f := &FrameMetadata{
@ -151,6 +151,8 @@ func ReadFrameFrom(b []byte) (*FrameMetadata, error) {
f.Target = net.TCPDestination(addr, port)
case TargetNetworkUDP:
f.Target = net.UDPDestination(addr, port)
default:
return nil, errors.New("Proxymann|Mux: Unknown network type: ", network)
}
}