@@ -288,8 +288,8 @@ protected enum TryBlockEvaluatedState
288
288
if ( left is BubbleExceptionContainer leftExceptionContainer )
289
289
{
290
290
ExceptionDispatchInfo . Capture ( leftExceptionContainer . Exception ) . Throw ( ) ;
291
- // Will not go here but Resharper detect some errors because he does not know ExceptionDispatchInfo stuff .
292
- throw leftExceptionContainer . Exception ;
291
+ // Will not go here but need to return something to avoid compilation errors .
292
+ return null ;
293
293
}
294
294
else if ( ! left )
295
295
{
@@ -298,8 +298,8 @@ protected enum TryBlockEvaluatedState
298
298
else if ( right is BubbleExceptionContainer rightExceptionContainer )
299
299
{
300
300
ExceptionDispatchInfo . Capture ( rightExceptionContainer . Exception ) . Throw ( ) ;
301
- // Will not go here but Resharper detect some errors because he does not know ExceptionDispatchInfo stuff .
302
- throw rightExceptionContainer . Exception ;
301
+ // Will not go here but need to return something to avoid compilation errors .
302
+ return null ;
303
303
}
304
304
else
305
305
{
@@ -313,8 +313,8 @@ protected enum TryBlockEvaluatedState
313
313
if ( left is BubbleExceptionContainer leftExceptionContainer )
314
314
{
315
315
ExceptionDispatchInfo . Capture ( leftExceptionContainer . Exception ) . Throw ( ) ;
316
- // Will not go here but Resharper detect some errors because he does not know ExceptionDispatchInfo stuff .
317
- throw leftExceptionContainer . Exception ;
316
+ // Will not go here but need to return something to avoid compilation errors .
317
+ return null ;
318
318
}
319
319
else if ( left )
320
320
{
@@ -323,8 +323,8 @@ protected enum TryBlockEvaluatedState
323
323
else if ( right is BubbleExceptionContainer rightExceptionContainer )
324
324
{
325
325
ExceptionDispatchInfo . Capture ( rightExceptionContainer . Exception ) . Throw ( ) ;
326
- // Will not go here but Resharper detect some errors because he does not know ExceptionDispatchInfo stuff .
327
- throw rightExceptionContainer . Exception ;
326
+ // Will not go here but need to return something to avoid compilation errors .
327
+ return null ;
328
328
}
329
329
else
330
330
{
@@ -1658,6 +1658,8 @@ public object Evaluate(string expression)
1658
1658
catch ( TargetInvocationException exception ) when ( exception . InnerException != null )
1659
1659
{
1660
1660
ExceptionDispatchInfo . Capture ( exception . InnerException ) . Throw ( ) ;
1661
+ // Will not go here but need to return something to avoid compilation errors.
1662
+ return null ;
1661
1663
}
1662
1664
finally
1663
1665
{
@@ -3376,7 +3378,7 @@ protected virtual object ManageKindOfAssignation(string expression, ref int inde
3376
3378
3377
3379
if ( rightExpression . Trim ( ) . Equals ( string . Empty ) )
3378
3380
throw new ExpressionEvaluatorSyntaxErrorException ( "Right part is missing in assignation" ) ;
3379
-
3381
+
3380
3382
if ( match . Groups [ "assignmentPrefix" ] . Success )
3381
3383
{
3382
3384
ExpressionOperator prefixOp = operatorsDictionary [ match . Groups [ "assignmentPrefix" ] . Value ] ;
@@ -4147,8 +4149,8 @@ protected virtual Type GetTypeByFriendlyName(string typeName, string genericType
4147
4149
catch ( ExpressionEvaluatorSyntaxErrorException exception )
4148
4150
{
4149
4151
ExceptionDispatchInfo . Capture ( exception ) . Throw ( ) ;
4150
- // Will not go here but Resharper detect some errors because he does not know ExceptionDispatchInfo stuff .
4151
- throw ;
4152
+ // Will not go here but need to return something to avoid compilation errors .
4153
+ return null ;
4152
4154
}
4153
4155
catch { }
4154
4156
0 commit comments