You need to set a timeout for that to work. As mentioned in the docs:
3 The time specified in timeout has been exceeded.
By default there is no timeout specified, so unless there is a real error then nothing will ever happen.
The length of time, in milliseconds, to allow for the geo location request to return. By default there is no timeout.
When the user decided not to share their location information nothing happens. So specify a timeout and then your error message will fire after that amount of time.