opendns / lemming

OpenDNS Data Systems Automation
Apache License 2.0
3 stars 5 forks source link

lomax: Better error messages on misconfigured input. #43

Closed simar7 closed 8 years ago

simar7 commented 8 years ago

Currently upon a misconfigured test bench with an option either missing or ill-defined, the testbench throws the following error:

➜  lomax git:(master) ✗ ./lomax --vector=openstack-generic-test-select.json --config=openstack-generic-config.json
panic: interface conversion: interface is nil, not int

goroutine 1 [running]:
runtime.panic(0x6011a0, 0xc21004f5c0)
        /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
main.initPtrs()
        /home/simar/syseng/gocode/src/github.com/opendns/lemming/lomax/lomax.go:75 +0x2ad
main.main()
        /home/simar/syseng/gocode/src/github.com/opendns/lemming/lomax/lomax.go:298 +0x35

This isn't very informative and the user wouldn't really know what went wrong. We need to give better error messages.

simar7 commented 8 years ago

https://github.com/opendns/lemming/commit/5c60815482ca1e994404274cf87dbd4db883a719 fixes this.