diff options
author | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-24 18:37:48 +0900 |
---|---|---|
committer | Mikio Hara <mikioh.mikioh@gmail.com> | 2017-04-25 21:39:18 +0000 |
commit | 91c9b0d568e41449f26858d88eb2fd085eaf306d (patch) | |
tree | 9c1db20e66b464395fcd99c7c7d92e44a60ebe6b /src/runtime/netpoll_windows.go | |
parent | 5d306dcdace2ec5cde7d0008d6126c3cffe25ea1 (diff) | |
download | go-91c9b0d568e41449f26858d88eb2fd085eaf306d.tar.gz go-91c9b0d568e41449f26858d88eb2fd085eaf306d.zip |
runtime: adjust netpoll panic messages
Change-Id: I34547b057605bb9e1e2227c41867589348560244
Reviewed-on: https://go-review.googlesource.com/41513
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/netpoll_windows.go')
-rw-r--r-- | src/runtime/netpoll_windows.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/runtime/netpoll_windows.go b/src/runtime/netpoll_windows.go index d714d0ac6e..79dafb0279 100644 --- a/src/runtime/netpoll_windows.go +++ b/src/runtime/netpoll_windows.go @@ -36,8 +36,8 @@ var iocphandle uintptr = _INVALID_HANDLE_VALUE // completion port io handle func netpollinit() { iocphandle = stdcall4(_CreateIoCompletionPort, _INVALID_HANDLE_VALUE, 0, 0, _DWORD_MAX) if iocphandle == 0 { - println("netpoll: failed to create iocp handle (errno=", getlasterror(), ")") - throw("netpoll: failed to create iocp handle") + println("runtime: CreateIoCompletionPort failed (errno=", getlasterror(), ")") + throw("runtime: netpollinit failed") } } @@ -58,7 +58,7 @@ func netpollclose(fd uintptr) int32 { } func netpollarm(pd *pollDesc, mode int) { - throw("unused") + throw("runtime: unused") } // Polls for completed network IO. @@ -94,8 +94,8 @@ retry: if !block && errno == _WAIT_TIMEOUT { return nil } - println("netpoll: GetQueuedCompletionStatusEx failed (errno=", errno, ")") - throw("netpoll: GetQueuedCompletionStatusEx failed") + println("runtime: GetQueuedCompletionStatusEx failed (errno=", errno, ")") + throw("runtime: netpoll failed") } mp.blocked = false for i = 0; i < n; i++ { @@ -121,8 +121,8 @@ retry: return nil } if op == nil { - println("netpoll: GetQueuedCompletionStatus failed (errno=", errno, ")") - throw("netpoll: GetQueuedCompletionStatus failed") + println("runtime: GetQueuedCompletionStatus failed (errno=", errno, ")") + throw("runtime: netpoll failed") } // dequeued failed IO packet, so report that } @@ -137,12 +137,13 @@ retry: func handlecompletion(gpp *guintptr, op *net_op, errno int32, qty uint32) { if op == nil { - throw("netpoll: GetQueuedCompletionStatus returned op == nil") + println("runtime: GetQueuedCompletionStatus returned op == nil") + throw("runtime: netpoll failed") } mode := op.mode if mode != 'r' && mode != 'w' { - println("netpoll: GetQueuedCompletionStatus returned invalid mode=", mode) - throw("netpoll: GetQueuedCompletionStatus returned invalid mode") + println("runtime: GetQueuedCompletionStatus returned invalid mode=", mode) + throw("runtime: netpoll failed") } op.errno = errno op.qty = qty |