Capture exceptions

@barnabyc @flahertyb