Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove QueryFailed #23382

Merged
1 commit merged into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ protected override Expression VisitExtension(Expression extensionExpression)
return newIncludeExpression;

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(extensionExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(extensionExpression.Print()));
}
}

Expand Down Expand Up @@ -336,7 +336,7 @@ protected override Expression VisitMember(MemberExpression memberExpression)
break;

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(memberExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(memberExpression.Print()));
}

var navigationProjection = innerEntityProjection.BindMember(
Expand Down Expand Up @@ -372,7 +372,7 @@ protected override Expression VisitMember(MemberExpression memberExpression)
}

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(memberExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(memberExpression.Print()));
}

Expression NullSafeUpdate(Expression expression)
Expand Down Expand Up @@ -529,7 +529,7 @@ protected override Expression VisitMethodCall(MethodCallExpression methodCallExp
break;

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(methodCallExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(methodCallExpression.Print()));
}

Expression navigationProjection;
Expand Down Expand Up @@ -576,7 +576,7 @@ protected override Expression VisitMethodCall(MethodCallExpression methodCallExp
}

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(methodCallExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(methodCallExpression.Print()));
}
}

Expand Down Expand Up @@ -725,7 +725,7 @@ private void VerifySelectExpression(ProjectionBindingExpression projectionBindin
{
if (projectionBindingExpression.QueryExpression != _selectExpression)
{
throw new InvalidOperationException(CoreStrings.QueryFailed(projectionBindingExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(projectionBindingExpression.Print()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private int GetProjectionIndex(ProjectionBindingExpression projectionBindingExpr
=> projectionBindingExpression.ProjectionMember != null
? _selectExpression.GetMappedProjection(projectionBindingExpression.ProjectionMember).GetConstantValue<int>()
: projectionBindingExpression.Index
?? throw new InvalidOperationException(CoreStrings.QueryFailed(projectionBindingExpression.Print(), GetType().Name));
?? throw new InvalidOperationException(CoreStrings.TranslationFailed(projectionBindingExpression.Print()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected override Expression VisitBinary(BinaryExpression binaryExpression)
break;
default:
throw new InvalidOperationException(
CoreStrings.QueryFailed(binaryExpression.Print(), GetType().Name));
CoreStrings.TranslationFailed(binaryExpression.Print()));
}
}

Expand Down Expand Up @@ -260,7 +260,7 @@ protected override Expression VisitExtension(Expression extensionExpression)
objectArrayProjection = objectArrayProjectionExpression;
break;
default:
throw new InvalidOperationException(CoreStrings.QueryFailed(extensionExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(extensionExpression.Print()));
}

var jArray = _projectionBindings[objectArrayProjection];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ protected override Expression VisitExtension(Expression extensionExpression)
: QueryCompilationContext.NotTranslatedExpression;
}

throw new InvalidOperationException(CoreStrings.QueryFailed(extensionExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(extensionExpression.Print()));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ protected override Expression VisitExtension(Expression extensionExpression)
return _clientEval ? extensionExpression : QueryCompilationContext.NotTranslatedExpression;

default:
throw new InvalidOperationException(CoreStrings.QueryFailed(extensionExpression.Print(), GetType().Name));
throw new InvalidOperationException(CoreStrings.TranslationFailed(extensionExpression.Print()));
}
}

Expand Down
8 changes: 0 additions & 8 deletions src/EFCore/Properties/CoreStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/EFCore/Properties/CoreStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1233,9 +1233,6 @@
<data name="QueryEntityMaterializationConditionWrongShape" xml:space="preserve">
<value>The materialization condition passed for entity shaper of entity type '{entityType}' is not of the correct shape. A materialization condition must be a 'LambdaExpression' of 'Func&lt;ValueBuffer, IEntityType&gt;'.</value>
</data>
<data name="QueryFailed" xml:space="preserve">
<value>Processing of the LINQ expression '{expression}' by '{visitor}' failed. This may indicate either a bug or a limitation in Entity Framework. See https://go.microsoft.com/fwlink/?linkid=2101433 for more detailed information.</value>
</data>
<data name="QueryInvalidMaterializationType" xml:space="preserve">
<value>The query contains a projection '{projection}' of type '{queryableType}'. Collections in the final projection must be an 'IEnumerable&lt;T&gt;' type such as 'List&lt;T&gt;'. Consider using 'ToList' or some other mechanism to convert the 'IQueryable&lt;T&gt;' or 'IOrderedEnumerable&lt;T&gt;' into an 'IEnumerable&lt;T&gt;'.</value>
</data>
Expand Down