Add onWillThrowError

This will allow packages to override the dev tools popping up behavior.