Add support for constructors that throw exceptions

Change-Id: I1b4139d4f0988f62f05ce65b05241d0a00db6e39