[core] add --exit-on-error

Exit on every core failure, even network disconnect.
This is mostly useful for the automated test-suite we are working on.

Fixes issue #273