Allow users to override default error handler in web platform build