Throw exception when unable to compile generated code.