Test-only `asap.setOnError` instead of public `asap.onerror`.