@@ -25,7 +25,7 @@ namespace firestore {
25
25
26
26
using model::DocumentKey;
27
27
using model::ResourcePath;
28
- using util::ThrowInvalidArgument ;
28
+ using util::ThrowInvalidArgumentIos ;
29
29
30
30
QueryInternal::QueryInternal (api::Query&& query)
31
31
: query_{std::move (query)},
@@ -124,7 +124,7 @@ bool operator==(const QueryInternal& lhs, const QueryInternal& rhs) {
124
124
core::Bound QueryInternal::ToBound (
125
125
BoundPosition bound_pos, const DocumentSnapshot& public_snapshot) const {
126
126
if (!public_snapshot.exists ()) {
127
- ThrowInvalidArgument (
127
+ ThrowInvalidArgumentIos (
128
128
" Invalid query. You are trying to start or end a query using a "
129
129
" document that doesn't exist." );
130
130
}
@@ -163,7 +163,7 @@ core::Bound QueryInternal::ToBound(
163
163
" query using a document for which the field '" ) +
164
164
field_path.CanonicalString () +
165
165
" ' (used as the order by) does not exist." ;
166
- ThrowInvalidArgument (message.c_str ());
166
+ ThrowInvalidArgumentIos (message.c_str ());
167
167
}
168
168
169
169
if (value->type () == model::FieldValue::Type::ServerTimestamp) {
@@ -181,7 +181,7 @@ core::Bound QueryInternal::ToBound(
181
181
field_path.CanonicalString () +
182
182
" ' is an uncommitted server timestamp. (Since the value of this"
183
183
" field is unknown, you cannot start/end a query with it.)" ;
184
- ThrowInvalidArgument (message.c_str ());
184
+ ThrowInvalidArgumentIos (message.c_str ());
185
185
}
186
186
187
187
components.push_back (std::move (value).value ());
@@ -199,7 +199,7 @@ core::Bound QueryInternal::ToBound(
199
199
internal_query.explicit_order_bys ();
200
200
201
201
if (field_values.size () > explicit_order_bys.size ()) {
202
- ThrowInvalidArgument (
202
+ ThrowInvalidArgumentIos (
203
203
" Invalid query. You are trying to start or end a query using more "
204
204
" values than were specified in the order by." );
205
205
}
@@ -223,7 +223,7 @@ core::Bound QueryInternal::ToBound(
223
223
model::FieldValue QueryInternal::ConvertDocumentId (
224
224
const model::FieldValue& from, const core::Query& internal_query) const {
225
225
if (from.type () != model::FieldValue::Type::String) {
226
- ThrowInvalidArgument (
226
+ ThrowInvalidArgumentIos (
227
227
" Invalid query. Expected a string for the document ID." );
228
228
}
229
229
const std::string& document_id = from.string_value ();
@@ -240,7 +240,7 @@ model::FieldValue QueryInternal::ConvertDocumentId(
240
240
" by document "
241
241
" ID, you must pass a plain document ID, but '" ) +
242
242
document_id + " ' contains a slash." ;
243
- ThrowInvalidArgument (message.c_str ());
243
+ ThrowInvalidArgumentIos (message.c_str ());
244
244
}
245
245
246
246
ResourcePath path =
@@ -259,7 +259,7 @@ model::FieldValue QueryInternal::ConvertDocumentId(
259
259
" document path, but '" ) +
260
260
path.CanonicalString () +
261
261
" ' is not because it contains an odd number of segments." ;
262
- ThrowInvalidArgument (message.c_str ());
262
+ ThrowInvalidArgumentIos (message.c_str ());
263
263
}
264
264
265
265
const model::DatabaseId& database_id = firestore_internal ()->database_id ();
0 commit comments