Backported errorHandle::deprecated() from master to 3.x