Make sure constructor throws on error