I think you should leave the check for errors in here, no need to continue with inlining if there were errors.