We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 275c9ff commit 00e9e20Copy full SHA for 00e9e20
src/NHibernate/Linq/Visitors/NhPartialEvaluatingExpressionVisitor.cs
@@ -18,6 +18,7 @@
18
using System;
19
using System.Linq;
20
using System.Linq.Expressions;
21
+using System.Reflection;
22
using NHibernate.Collection;
23
using NHibernate.Engine;
24
using NHibernate.Impl;
@@ -145,7 +146,14 @@ private Expression EvaluateSubtree(Expression subtree)
145
146
return constantExpression;
147
}
148
- return Expression.Constant(ExpressionProcessor.FindValue(subtree), subtree.Type);
149
+ try
150
+ {
151
+ return Expression.Constant(ExpressionProcessor.FindValue(subtree), subtree.Type);
152
+ }
153
+ catch (TargetInvocationException ex)
154
155
+ throw ReflectHelper.UnwrapTargetInvocationException(ex);
156
157
158
159
#region NH additions
0 commit comments