Make an error seems to be far more broadly used than cause an error and commit an error as the below Ngram Viewer shows:
However, if you search "code makes an error", "code causes an error" and "code commits error", only code causes an error appears. I would advise you to use cause before an unchecked run-time error.