Exception handling in multi-master setup.

Refs #10732
Merge pull request #10868 from cachedout/10732

Exception handling in multi-master setup.