throwOnError

Throws an exception if the permission state is not PermissionState.Granted or PermissionState.NotDetermined.