Capture exceptions during remote compilation and pass them back to the caller