Fixed adding error objects to exception before throwing.