exit domain after emitting error in callback

This is necessary because the try/catch keeps the usual domain.js
mechanics from exiting the domain.