@@ -262,7 +262,7 @@ public void Translate(Expression expression)
262
262
break ;
263
263
default :
264
264
var message = string . Format ( "The {0} query operator is not supported." , methodName ) ;
265
- throw new InvalidOperationException ( message ) ;
265
+ throw new NotSupportedException ( message ) ;
266
266
}
267
267
}
268
268
@@ -821,7 +821,7 @@ private void CombinePredicateWithWhereClause(MethodCallExpression methodCallExpr
821
821
if ( _projection != null )
822
822
{
823
823
var message = string . Format ( "{0} with predicate after a projection is not supported." , methodCallExpression . Method . Name ) ;
824
- throw new InvalidOperationException ( message ) ;
824
+ throw new NotSupportedException ( message ) ;
825
825
}
826
826
827
827
if ( _where == null )
@@ -1012,7 +1012,7 @@ private void SetElementSelector(MethodCallExpression methodCallExpression, Func<
1012
1012
if ( _elementSelector != null )
1013
1013
{
1014
1014
var message = string . Format ( "{0} cannot be combined with any other element selector." , methodCallExpression . Method . Name ) ;
1015
- throw new InvalidOperationException ( message ) ;
1015
+ throw new NotSupportedException ( message ) ;
1016
1016
}
1017
1017
_elementSelector = elementSelector ;
1018
1018
}
@@ -1100,7 +1100,7 @@ private void TranslateDistinct(MethodCallExpression methodCallExpression)
1100
1100
if ( arguments . Length != 1 )
1101
1101
{
1102
1102
var message = "The version of the Distinct query operator with an equality comparer is not supported." ;
1103
- throw new InvalidOperationException ( message ) ;
1103
+ throw new NotSupportedException ( message ) ;
1104
1104
}
1105
1105
1106
1106
_distinct = true ;
@@ -1285,7 +1285,7 @@ private void TranslateOrderBy(MethodCallExpression methodCallExpression)
1285
1285
1286
1286
if ( _orderBy != null )
1287
1287
{
1288
- throw new InvalidOperationException ( "Only one OrderBy or OrderByDescending clause is allowed (use ThenBy or ThenByDescending for multiple order by clauses)." ) ;
1288
+ throw new NotSupportedException ( "Only one OrderBy or OrderByDescending clause is allowed (use ThenBy or ThenByDescending for multiple order by clauses)." ) ;
1289
1289
}
1290
1290
1291
1291
var key = ( LambdaExpression ) StripQuote ( methodCallExpression . Arguments [ 1 ] ) ;
@@ -1307,7 +1307,7 @@ private void TranslateSelect(MethodCallExpression methodCallExpression)
1307
1307
if ( lambdaExpression . Parameters . Count == 2 )
1308
1308
{
1309
1309
var message = "The indexed version of the Select query operator is not supported." ;
1310
- throw new InvalidOperationException ( message ) ;
1310
+ throw new NotSupportedException ( message ) ;
1311
1311
}
1312
1312
if ( lambdaExpression . Parameters . Count != 1 )
1313
1313
{
@@ -1350,7 +1350,7 @@ private void TranslateThenBy(MethodCallExpression methodCallExpression)
1350
1350
1351
1351
if ( _orderBy == null )
1352
1352
{
1353
- throw new InvalidOperationException ( "ThenBy or ThenByDescending can only be used after OrderBy or OrderByDescending." ) ;
1353
+ throw new NotSupportedException ( "ThenBy or ThenByDescending can only be used after OrderBy or OrderByDescending." ) ;
1354
1354
}
1355
1355
1356
1356
var key = ( LambdaExpression ) StripQuote ( methodCallExpression . Arguments [ 1 ] ) ;
@@ -1371,7 +1371,7 @@ private void TranslateWhere(MethodCallExpression methodCallExpression)
1371
1371
if ( predicate . Parameters . Count == 2 )
1372
1372
{
1373
1373
var message = "The indexed version of the Where query operator is not supported." ;
1374
- throw new InvalidOperationException ( message ) ;
1374
+ throw new NotSupportedException ( message ) ;
1375
1375
}
1376
1376
1377
1377
CombinePredicateWithWhereClause ( methodCallExpression , predicate ) ;
0 commit comments