mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 16:35:10 +03:00
return error instead of panic()
This commit is contained in:
parent
d8e4f41ac8
commit
acc2c8967a
2 changed files with 5 additions and 3 deletions
|
@ -38,7 +38,7 @@ func TestBroadcast(t *testing.T) {
|
|||
|
||||
ifce, err := NewTAP("test")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
t.Fatalf("creating TAP error: %v\n", err)
|
||||
}
|
||||
|
||||
setupIfce(t, net.IPNet{IP: self, Mask: mask}, ifce.Name())
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
package water
|
||||
|
||||
import "errors"
|
||||
|
||||
func newTAP(ifName string) (ifce *Interface, err error) {
|
||||
panic("water: tap interface not implemented on this platform")
|
||||
return nil, errors.New("tap interface not implemented on this platform")
|
||||
}
|
||||
|
||||
func newTUN(ifName string) (ifce *Interface, err error) {
|
||||
panic("water: tap interface not implemented on this platform")
|
||||
return nil, errors.New("tap interface not implemented on this platform")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue