Make it possible to setup onerror manually.