Open braydonf opened 8 years ago
An runtime error will happen with untrusted X.509 certificates:
panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x458589] goroutine 1 [running]: github.com/bitpay/bitpay-go/client.(*Client).PairClient(0xc208078120, 0xc20803bb90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/testuser/go/src/github.com/bitpay/bitpay-go/client/client.go:114 +0x5e9 github.com/bitpay/bitpay-go/client.(*Client).PairWithCode(0xc208078120, 0x719690, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/testuser/go/src/github.com/bitpay/bitpay-go/client/client.go:98 +0x233 main.main() /home/testuser/testing/go-client/test.go:17 +0x26c goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 exit status 2
เช็ค
the library is not handling the errors ...so it's expected to panic...
An runtime error will happen with untrusted X.509 certificates: