merge-recursive: make the error-message generation an extern function