Convert ext/standard/errorfunc to HNI

Part of #1480