add exception helper for ZMQ context shutdown