/// <summary>Throws <paramref name="error"/> as <see cref="NSErrorException"/> if not null. </summary>
 /// <param name="error">The error.</param>
 /// <exception cref="NSErrorException"> if <paramref name="error"/> is not null. </exception>
 public static void ThrowNotNullAsException(this NSError error)
 {
     if (error == null)
     {
         return;
     }
     throw error.AsException();
 }